NFSv4: Fix an Oops in nfs_do_expire_all_delegations
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 3 Jan 2006 08:55:58 +0000 (09:55 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:58 +0000 (14:58 -0500)
 If the loop errors, we need to exit.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/delegation.c

index 66cc720e39277b7d6f9f6b9d0a8cf34538d24c51..c6f07c1c71e60a0be7fe96d24a71417d0bd55359 100644 (file)
@@ -236,7 +236,6 @@ int nfs_do_expire_all_delegations(void *ptr)
        struct nfs4_client *clp = ptr;
        struct nfs_delegation *delegation;
        struct inode *inode;
-       int err = 0;
 
        allow_signal(SIGKILL);
 restart:
@@ -250,10 +249,9 @@ restart:
                if (inode == NULL)
                        continue;
                spin_unlock(&clp->cl_lock);
-               err = nfs_inode_return_delegation(inode);
+               nfs_inode_return_delegation(inode);
                iput(inode);
-               if (!err)
-                       goto restart;
+               goto restart;
        }
 out:
        spin_unlock(&clp->cl_lock);