]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix callback handling
authorDavid Howells <dhowells@redhat.com>
Fri, 19 Oct 2018 23:57:59 +0000 (00:57 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 23 Oct 2018 23:41:09 +0000 (00:41 +0100)
commit1cc4de6db3fc6bdf392b7c220099fc9ecf603254
tree9565bfd8b0dec553d351ca13ce841a5e2bbeae7a
parent93460ae775fdcafdaab9951d744191d92f63ed39
afs: Fix callback handling

In some circumstances, the callback interest pointer is NULL, so in such a
case we can't dereference it when checking to see if the callback is
broken.  This causes an oops in some circumstances.

Fix this by replacing the function that worked out the aggregate break
counter with one that actually does the comparison, and then make that
return true (ie. broken) if there is no callback interest as yet (ie. the
pointer is NULL).

Fixes: 2d89fa160118 ("afs: Fix whole-volume callback handling")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/fsclient.c
fs/afs/internal.h
fs/afs/security.c
fs/afs/yfsclient.c