mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-19 12:00:00 +00:00
afs: Fix off-by-one in afs_rename() expected data version calculation
When afs_rename() calculates the expected data version of the target directory in a cross-directory rename, it doesn't increment it as it should, so it always thinks that the target inode is unexpectedly modified on the server. Fixes: a58823ac4589 ("afs: Fix application of status and callback to be under same lock") Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
a6eed4ab5d
commit
37c0bbb332
@ -1804,7 +1804,7 @@ static int afs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
afs_end_vnode_operation(&fc);
|
||||
goto error_rehash;
|
||||
}
|
||||
new_data_version = new_dvnode->status.data_version;
|
||||
new_data_version = new_dvnode->status.data_version + 1;
|
||||
} else {
|
||||
new_data_version = orig_data_version;
|
||||
new_scb = &scb[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user