diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-02 10:30:00 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:20:08 -0400 |
commit | 81c768808c78283e1b4ed4cd2cad2571294b2090 (patch) | |
tree | 7282d227bc8dcbaba8eacdbb62df202d66f0278f /fs | |
parent | d75340cc4de5c187fbf0bba234309ca86cf0a2fb (diff) |
NFSv3: Always use directory post-op attributes in nfs3_proc_lookup
LOOKUP returns the directory post-op attributes whether or not the
operation was successful.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs3proc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index ce1fb99e67e1..6e05f6c9c910 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -166,6 +166,7 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name, | |||
166 | nfs_fattr_init(&dir_attr); | 166 | nfs_fattr_init(&dir_attr); |
167 | nfs_fattr_init(fattr); | 167 | nfs_fattr_init(fattr); |
168 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 168 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
169 | nfs_refresh_inode(dir, &dir_attr); | ||
169 | if (status >= 0 && !(fattr->valid & NFS_ATTR_FATTR)) { | 170 | if (status >= 0 && !(fattr->valid & NFS_ATTR_FATTR)) { |
170 | msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR]; | 171 | msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR]; |
171 | msg.rpc_argp = fhandle; | 172 | msg.rpc_argp = fhandle; |
@@ -173,8 +174,6 @@ nfs3_proc_lookup(struct inode *dir, struct qstr *name, | |||
173 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 174 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
174 | } | 175 | } |
175 | dprintk("NFS reply lookup: %d\n", status); | 176 | dprintk("NFS reply lookup: %d\n", status); |
176 | if (status >= 0) | ||
177 | status = nfs_refresh_inode(dir, &dir_attr); | ||
178 | return status; | 177 | return status; |
179 | } | 178 | } |
180 | 179 | ||