]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: Move nfs40_init_client into nfs40client.c
authorAnna Schumaker <anna.schumaker@oracle.com>
Fri, 14 Nov 2025 20:15:19 +0000 (15:15 -0500)
committerAnna Schumaker <anna.schumaker@oracle.com>
Fri, 30 Jan 2026 16:42:20 +0000 (11:42 -0500)
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/nfs40.h
fs/nfs/nfs40client.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4client.c

index 9369bb08825a8c8051e93c226323aabc967e9945..5a9c5d367b125463327a04240ce7e1dc34117f4c 100644 (file)
@@ -5,6 +5,7 @@
 
 /* nfs40client.c */
 void nfs40_shutdown_client(struct nfs_client *);
+int nfs40_init_client(struct nfs_client *);
 
 /* nfs40proc.c */
 extern const struct nfs4_minor_version_ops nfs_v4_0_minor_ops;
index 4a19ad9df7890a7bdc3950da1c1b74d7f533dc6f..cd105dc1cee1ab3d068b906fe02bb23c4b766c46 100644 (file)
@@ -53,6 +53,33 @@ void nfs40_shutdown_client(struct nfs_client *clp)
        }
 }
 
+/**
+ * nfs40_init_client - nfs_client initialization tasks for NFSv4.0
+ * @clp: nfs_client to initialize
+ *
+ * Returns zero on success, or a negative errno if some error occurred.
+ */
+int nfs40_init_client(struct nfs_client *clp)
+{
+       struct nfs4_slot_table *tbl;
+       int ret;
+
+       tbl = kzalloc(sizeof(*tbl), GFP_NOFS);
+       if (tbl == NULL)
+               return -ENOMEM;
+
+       ret = nfs4_setup_slot_table(tbl, NFS4_MAX_SLOT_TABLE,
+                                       "NFSv4.0 transport Slot table");
+       if (ret) {
+               nfs4_shutdown_slot_table(tbl);
+               kfree(tbl);
+               return ret;
+       }
+
+       clp->cl_slot_tbl = tbl;
+       return 0;
+}
+
 /**
  * nfs40_walk_client_list - Find server that recognizes a client ID
  *
index 3a81a658e5d20f9ebbddd70fe2f1595cbe60bab3..9d0bec3a23f3c76da1b8c6e00dae88b7589d74fb 100644 (file)
@@ -483,7 +483,6 @@ extern const u32 nfs4_fsinfo_bitmap[3];
 extern const u32 nfs4_fs_locations_bitmap[3];
 
 void nfs41_shutdown_client(struct nfs_client *);
-int nfs40_init_client(struct nfs_client *);
 int nfs41_init_client(struct nfs_client *);
 void nfs4_free_client(struct nfs_client *);
 
index d83a8a2a3c707cc525a6fee7f3122b63f0c0a415..c376b2420b6cf205bbd28ff98d7fac7c4682aab5 100644 (file)
@@ -331,33 +331,6 @@ static int nfs4_init_callback(struct nfs_client *clp)
        return 0;
 }
 
-/**
- * nfs40_init_client - nfs_client initialization tasks for NFSv4.0
- * @clp: nfs_client to initialize
- *
- * Returns zero on success, or a negative errno if some error occurred.
- */
-int nfs40_init_client(struct nfs_client *clp)
-{
-       struct nfs4_slot_table *tbl;
-       int ret;
-
-       tbl = kzalloc(sizeof(*tbl), GFP_NOFS);
-       if (tbl == NULL)
-               return -ENOMEM;
-
-       ret = nfs4_setup_slot_table(tbl, NFS4_MAX_SLOT_TABLE,
-                                       "NFSv4.0 transport Slot table");
-       if (ret) {
-               nfs4_shutdown_slot_table(tbl);
-               kfree(tbl);
-               return ret;
-       }
-
-       clp->cl_slot_tbl = tbl;
-       return 0;
-}
-
 #if defined(CONFIG_NFS_V4_1)
 
 /**