diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-10-23 19:33:14 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2017-01-27 11:16:00 +0100 |
commit | dfdab4c438c9621ef04bd883f81b6877678bb572 (patch) | |
tree | 78f37b8cafca0e1b624f65d837bb928a31c113bf /fs | |
parent | a88a2be387d1d8a5843826e12009c79e32fb46c8 (diff) |
NFSv4: Ensure nfs_atomic_open set the dentry verifier on ENOENT
commit 809fd143de8805970eec02c27c0bc2622a6ecbda upstream.
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs')
-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 b9670301d7d3..24e6448b7c80 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1487,6 +1487,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry, switch (err) { case -ENOENT: d_add(dentry, NULL); + nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); break; case -EISDIR: case -ENOTDIR: |