]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix double inc of vnode->cb_break
authorDavid Howells <dhowells@redhat.com>
Fri, 10 May 2019 22:14:41 +0000 (23:14 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 May 2019 15:25:21 +0000 (16:25 +0100)
commite0a9377af006f748fb54eb7589239271d0296716
tree843b8000ed1df14647a708dde3f161e1a510a37b
parent8826353fe6a2f53a2a1ca7a484ed94700b4f2d35
afs: Fix double inc of vnode->cb_break

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: 010996447bca ("afs: Overhaul permit caching");
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/security.c