]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - fs/nfs/client.c
SUNRPC: Remove redundant calls to rpciod_up()/rpciod_down()
[mirror_ubuntu-focal-kernel.git] / fs / nfs / client.c
index 2190e6c2792e6f7ed1383f49b1e2f96c6565ef3d..71d4c4cdac5280a3ccbc75a382d4dfa9bf5316b7 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <linux/module.h>
 #include <linux/init.h>
-
+#include <linux/sched.h>
 #include <linux/time.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
@@ -27,7 +27,6 @@
 #include <linux/nfs_mount.h>
 #include <linux/nfs4_mount.h>
 #include <linux/lockd/bind.h>
-#include <linux/smp_lock.h>
 #include <linux/seq_file.h>
 #include <linux/mount.h>
 #include <linux/nfs_idmap.h>
@@ -103,19 +102,10 @@ static struct nfs_client *nfs_alloc_client(const char *hostname,
                                           int nfsversion)
 {
        struct nfs_client *clp;
-       int error;
 
        if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL)
                goto error_0;
 
-       error = rpciod_up();
-       if (error < 0) {
-               dprintk("%s: couldn't start rpciod! Error = %d\n",
-                               __FUNCTION__, error);
-               goto error_1;
-       }
-       __set_bit(NFS_CS_RPCIOD, &clp->cl_res_state);
-
        if (nfsversion == 4) {
                if (nfs_callback_up() < 0)
                        goto error_2;
@@ -155,9 +145,6 @@ error_3:
        if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state))
                nfs_callback_down();
 error_2:
-       rpciod_down();
-       __clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state);
-error_1:
        kfree(clp);
 error_0:
        return NULL;
@@ -199,9 +186,6 @@ static void nfs_free_client(struct nfs_client *clp)
        if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state))
                nfs_callback_down();
 
-       if (__test_and_clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state))
-               rpciod_down();
-
        kfree(clp->cl_hostname);
        kfree(clp);
 
@@ -618,7 +602,8 @@ static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_dat
        if (clp->cl_nfsversion == 3) {
                if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)
                        server->namelen = NFS3_MAXNAMLEN;
-               server->caps |= NFS_CAP_READDIRPLUS;
+               if (!(data->flags & NFS_MOUNT_NORDIRPLUS))
+                       server->caps |= NFS_CAP_READDIRPLUS;
        } else {
                if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
                        server->namelen = NFS2_MAXNAMLEN;