@@ -21,8 +21,10 @@
#include <net/handshake.h>
+#include "fscache.h"
#include "nfs.h"
#include "internal.h"
+#include "sysfs.h"
#include "nfstrace.h"
@@ -1644,6 +1646,17 @@ static int nfs_init_fs_context(struct fs_context *fc)
return 0;
}
+static void nfs_kill_super(struct super_block *s)
+{
+ struct nfs_server *server = NFS_SB(s);
+
+ nfs_sysfs_move_sb_to_server(server);
+ generic_shutdown_super(s);
+
+ nfs_fscache_release_super_cookie(s);
+ nfs_free_server(server);
+}
+
struct file_system_type nfs_fs_type = {
.owner = THIS_MODULE,
.name = "nfs",
@@ -447,7 +447,6 @@ extern const struct super_operations nfs_sops;
bool nfs_auth_info_match(const struct nfs_auth_info *, rpc_authflavor_t);
int nfs_try_get_tree(struct fs_context *);
int nfs_get_tree_common(struct fs_context *);
-void nfs_kill_super(struct super_block *);
extern struct rpc_stat nfs_rpcstat;
@@ -1329,22 +1329,6 @@ int nfs_get_tree_common(struct fs_context *fc)
goto out;
}
-/*
- * Destroy an NFS superblock
- */
-void nfs_kill_super(struct super_block *s)
-{
- struct nfs_server *server = NFS_SB(s);
-
- nfs_sysfs_move_sb_to_server(server);
- generic_shutdown_super(s);
-
- nfs_fscache_release_super_cookie(s);
-
- nfs_free_server(server);
-}
-EXPORT_SYMBOL_GPL(nfs_kill_super);
-
#if IS_ENABLED(CONFIG_NFS_V4)
/*
@@ -8,6 +8,8 @@
#define CONTAINER_ID_MAXLEN (64)
+struct nfs_net;
+
struct nfs_netns_client {
struct kobject kobject;
struct kobject nfs_net_kobj;
nfs_kill_super is only used in fs_context, so move it there. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/nfs/fs_context.c | 13 +++++++++++++ fs/nfs/internal.h | 1 - fs/nfs/super.c | 16 ---------------- fs/nfs/sysfs.h | 2 ++ 4 files changed, 15 insertions(+), 17 deletions(-)