NFSv3: Always use directory post-op attributes in nfs3_proc_lookup
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 2 Oct 2007 14:30:00 +0000 (10:30 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:20:08 +0000 (17:20 -0400)
LOOKUP returns the directory post-op attributes whether or not the
operation was successful.

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

index ce1fb99e67e16a01f683d794d209d236c78d994a..6e05f6c9c91008571f5014d6237aced85cebaf84 100644 (file)
@@ -166,6 +166,7 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name,
        nfs_fattr_init(&dir_attr);
        nfs_fattr_init(fattr);
        status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
+       nfs_refresh_inode(dir, &dir_attr);
        if (status >= 0 && !(fattr->valid & NFS_ATTR_FATTR)) {
                msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR];
                msg.rpc_argp = fhandle;
@@ -173,8 +174,6 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name,
                status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
        }
        dprintk("NFS reply lookup: %d\n", status);
-       if (status >= 0)
-               status = nfs_refresh_inode(dir, &dir_attr);
        return status;
 }
 
This page took 0.025428 seconds and 5 git commands to generate.