diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-10-23 12:33:14 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-11-04 20:53:49 -0500 |
commit | 809fd143de8805970eec02c27c0bc2622a6ecbda (patch) | |
tree | 182e4fae3a273244b2157c3024f967f2574af037 | |
parent | 0df1f2487d2f0d04703f142813d53615d62a1da4 (diff) |
NFSv4: Ensure nfs_atomic_open set the dentry verifier on ENOENT
If the OPEN rpc call to the server fails with an ENOENT call, nfs_atomic_open
will create a negative dentry for that file, however it currently fails
to call nfs_set_verifier(), thus causing the dentry to be immediately
revalidated on the next call to nfs_lookup_revalidate() instead of following
the usual lookup caching rules.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r-- | fs/nfs/dir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 06e8cfcbb670..6e62155abf26 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1527,6 +1527,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry, | |||
1527 | case -ENOENT: | 1527 | case -ENOENT: |
1528 | d_drop(dentry); | 1528 | d_drop(dentry); |
1529 | d_add(dentry, NULL); | 1529 | d_add(dentry, NULL); |
1530 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | ||
1530 | break; | 1531 | break; |
1531 | case -EISDIR: | 1532 | case -EISDIR: |
1532 | case -ENOTDIR: | 1533 | case -ENOTDIR: |