]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix afs_d_validate() to set the right directory version
authorDavid Howells <dhowells@redhat.com>
Sat, 11 Apr 2020 07:50:45 +0000 (08:50 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 13 Apr 2020 14:09:01 +0000 (15:09 +0100)
commit5a01c819e1541def2735c24de5be17e31aa0ba22
tree68d3a89099d8fda3866485281ab11163c8c05c7c
parentaec8030c9eed33f013e55ffaf3e3a84d90f66de3
afs: Fix afs_d_validate() to set the right directory version

If a dentry's version is somewhere between invalid_before and the current
directory version, we should be setting it forward to the current version,
not backwards to the invalid_before version.  Note that we're only doing
this at all because dentry::d_fsdata isn't large enough on a 32-bit system.

Fix this by using a separate variable for invalid_before so that we don't
accidentally clobber the current dir version.

Fixes: cc7a9c3402a1 ("afs: Keep track of invalid-before version for dentry coherency")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/dir.c