]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/nfs/client.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
[mv-sheeva.git] / fs / nfs / client.c
index a3191f023490a76e98c2bff645ebfbb4ae150e51..881fa490092393c97ee5c69dd2cfe33e6bd9c3c0 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>
@@ -394,7 +393,8 @@ static void nfs_init_timeout_values(struct rpc_timeout *to, int proto,
 static int nfs_create_rpc_client(struct nfs_client *clp, int proto,
                                                unsigned int timeo,
                                                unsigned int retrans,
-                                               rpc_authflavor_t flavor)
+                                               rpc_authflavor_t flavor,
+                                               int flags)
 {
        struct rpc_timeout      timeparms;
        struct rpc_clnt         *clnt = NULL;
@@ -407,6 +407,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp, int proto,
                .program        = &nfs_program,
                .version        = clp->rpc_ops->version,
                .authflavor     = flavor,
+               .flags          = flags,
        };
 
        if (!IS_ERR(clp->cl_rpcclient))
@@ -548,7 +549,7 @@ static int nfs_init_client(struct nfs_client *clp, const struct nfs_mount_data *
         * - RFC 2623, sec 2.3.2
         */
        error = nfs_create_rpc_client(clp, proto, data->timeo, data->retrans,
-                       RPC_AUTH_UNIX);
+                                       RPC_AUTH_UNIX, 0);
        if (error < 0)
                goto error;
        nfs_mark_client_ready(clp, NFS_CS_READY);
@@ -616,7 +617,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;
@@ -868,7 +870,8 @@ static int nfs4_init_client(struct nfs_client *clp,
        /* Check NFS protocol revision and initialize RPC op vector */
        clp->rpc_ops = &nfs_v4_clientops;
 
-       error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour);
+       error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour,
+                                       RPC_CLNT_CREATE_DISCRTRY);
        if (error < 0)
                goto error;
        memcpy(clp->cl_ipaddr, ip_addr, sizeof(clp->cl_ipaddr));
@@ -1178,7 +1181,7 @@ static struct seq_operations nfs_server_list_ops = {
        .show   = nfs_server_list_show,
 };
 
-static struct file_operations nfs_server_list_fops = {
+static const struct file_operations nfs_server_list_fops = {
        .open           = nfs_server_list_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
@@ -1198,7 +1201,7 @@ static struct seq_operations nfs_volume_list_ops = {
        .show   = nfs_volume_list_show,
 };
 
-static struct file_operations nfs_volume_list_fops = {
+static const struct file_operations nfs_volume_list_fops = {
        .open           = nfs_volume_list_open,
        .read           = seq_read,
        .llseek         = seq_lseek,