mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
afs: Fix double inc of vnode->cb_break
[ Upstream commitfd711586bb
] When __afs_break_callback() clears the CB_PROMISED flag, it increments vnode->cb_break to trigger a future refetch of the status and callback - however it also calls afs_clear_permits(), which also increments vnode->cb_break. Fix this by removing the increment from afs_clear_permits(). Whilst we're at it, fix the conditional call to afs_put_permits() as the function checks to see if the argument is NULL, so the check is redundant. Fixes:be080a6f43
("afs: Overhaul permit caching"); Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
98f5ce7e31
commit
2d4979582b
1 changed files with 1 additions and 3 deletions
|
@ -87,11 +87,9 @@ void afs_clear_permits(struct afs_vnode *vnode)
|
|||
permits = rcu_dereference_protected(vnode->permit_cache,
|
||||
lockdep_is_held(&vnode->lock));
|
||||
RCU_INIT_POINTER(vnode->permit_cache, NULL);
|
||||
vnode->cb_break++;
|
||||
spin_unlock(&vnode->lock);
|
||||
|
||||
if (permits)
|
||||
afs_put_permits(permits);
|
||||
afs_put_permits(permits);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue