afs: Fix afs_lookup() to not clobber the version on a new dentry
authorDavid Howells <dhowells@redhat.com>
Tue, 14 Jan 2020 16:16:54 +0000 (16:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:41 +0000 (19:48 +0100)
commit6410050a09e84dd5bbe7624d6541769e5b92a78d
tree271636a158efff25fd617acc8e9fe8af84fa994c
parent6f262298328f1d13e7563586b41f1f6dcba5072f
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>
fs/afs/dir.c