summaryrefslogtreecommitdiff
path: root/fs/afs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-01-14 19:16:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-17 21:48:41 +0300
commit6410050a09e84dd5bbe7624d6541769e5b92a78d (patch)
tree271636a158efff25fd617acc8e9fe8af84fa994c /fs/afs
parent6f262298328f1d13e7563586b41f1f6dcba5072f (diff)
downloadlinux-6410050a09e84dd5bbe7624d6541769e5b92a78d.tar.xz
afs: Fix afs_lookup() to not clobber the version on a new dentry
commit f52b83b0b1c40ada38df917973ab719a4a753951 upstream. Fix afs_lookup() to not clobber the version set on a new dentry by afs_do_lookup() - especially as it's using the wrong version of the version (we need to use the one given to us by whatever op the dir contents correspond to rather than what's in the afs_vnode). Fixes: 9dd0b82ef530 ("afs: Fix missing dentry data version updating") Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/dir.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 813db1708494..5c794f4b051a 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -952,12 +952,8 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
afs_stat_v(dvnode, n_lookup);
inode = afs_do_lookup(dir, dentry, key);
key_put(key);
- if (inode == ERR_PTR(-ENOENT)) {
+ if (inode == ERR_PTR(-ENOENT))
inode = afs_try_auto_mntpt(dentry, dir);
- } else {
- dentry->d_fsdata =
- (void *)(unsigned long)dvnode->status.data_version;
- }
if (!IS_ERR_OR_NULL(inode))
fid = AFS_FS_I(inode)->fid;