]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/nfs4proc.c
[PATCH] kmemdup: some users
[linux-2.6-omap-h63xx.git] / fs / nfs / nfs4proc.c
index 2d18eac6bee51f30ad14262ce9e400f2d72df409..47c7e6e3910d738a9bdf4313e390b7349427f9d3 100644 (file)
@@ -55,7 +55,7 @@
 
 #define NFSDBG_FACILITY                NFSDBG_PROC
 
-#define NFS4_POLL_RETRY_MIN    (1*HZ)
+#define NFS4_POLL_RETRY_MIN    (HZ/10)
 #define NFS4_POLL_RETRY_MAX    (15*HZ)
 
 struct nfs4_opendata;
@@ -793,10 +793,17 @@ out:
 int nfs4_recover_expired_lease(struct nfs_server *server)
 {
        struct nfs_client *clp = server->nfs_client;
+       int ret;
 
-       if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
+       for (;;) {
+               ret = nfs4_wait_clnt_recover(server->client, clp);
+               if (ret != 0)
+                       return ret;
+               if (!test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
+                       break;
                nfs4_schedule_state_recovery(clp);
-       return nfs4_wait_clnt_recover(server->client, clp);
+       }
+       return 0;
 }
 
 /*
@@ -2085,7 +2092,7 @@ static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *n
 }
 
 static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
-               struct qstr *path, struct iattr *sattr)
+               struct page *page, unsigned int len, struct iattr *sattr)
 {
        struct nfs_server *server = NFS_SERVER(dir);
        struct nfs_fh fhandle;
@@ -2111,10 +2118,11 @@ static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
        };
        int                     status;
 
-       if (path->len > NFS4_MAXPATHLEN)
+       if (len > NFS4_MAXPATHLEN)
                return -ENAMETOOLONG;
 
-       arg.u.symlink = path;
+       arg.u.symlink.pages = &page;
+       arg.u.symlink.len = len;
        nfs_fattr_init(&fattr);
        nfs_fattr_init(&dir_fattr);
        
@@ -2128,13 +2136,14 @@ static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
 }
 
 static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
-               struct qstr *path, struct iattr *sattr)
+               struct page *page, unsigned int len, struct iattr *sattr)
 {
        struct nfs4_exception exception = { };
        int err;
        do {
                err = nfs4_handle_exception(NFS_SERVER(dir),
-                               _nfs4_proc_symlink(dir, dentry, path, sattr),
+                               _nfs4_proc_symlink(dir, dentry, page,
+                                                       len, sattr),
                                &exception);
        } while (exception.retry);
        return err;
@@ -2882,6 +2891,7 @@ int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct
                        if (ret == 0)
                                exception->retry = 1;
                        break;
+               case -NFS4ERR_FILE_OPEN:
                case -NFS4ERR_GRACE:
                case -NFS4ERR_DELAY:
                        ret = nfs4_delay(server->client, &exception->timeout);