NFS: Fix a bug in nfs_open_revalidate()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 3 Oct 2007 19:58:38 +0000 (15:58 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:19:30 +0000 (17:19 -0400)
We want to set the verifier when the call to nfs4_open_revalidate()
_succeeds_.

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

index 166a833..d58bfb8 100644 (file)
@@ -1078,7 +1078,7 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd)
        lock_kernel();
        verifier = nfs_save_change_attribute(dir);
        ret = nfs4_open_revalidate(dir, dentry, openflags, nd);
-       if (!ret)
+       if (ret == 1)
                nfs_set_verifier(dentry, verifier);
        unlock_kernel();
 out: