]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Handle lock rpc ops failing on a file that got deleted
authorDavid Howells <dhowells@redhat.com>
Thu, 25 Apr 2019 13:26:51 +0000 (14:26 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 25 Apr 2019 13:26:51 +0000 (14:26 +0100)
commit12be105ad5c06f7a44f971c8dfd99560237cd8d5
treef113dc931a8677a31d9aa70e50953a2a08357cd3
parent68a40e4d5143722b74744b173b9389069e747ed6
afs: Handle lock rpc ops failing on a file that got deleted

Holding a file lock on an AFS file does not prevent it from being deleted
on the server, so we need to handle an error resulting from that when we
try setting, extending or releasing a lock.

Fix this by adding a "deleted" lock state and cancelling the lock extension
process for that file and aborting all waiters for the lock.

Fixes: 8825427296e1 ("afs: Fix file locking")
Reported-by: Jonathan Billings <jsbillin@umich.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/flock.c
fs/afs/internal.h
include/trace/events/afs.h