diff options
author | David Howells <dhowells@redhat.com> | 2019-04-25 16:26:51 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-04-25 16:26:51 +0300 |
commit | cdfb26b40dfa51127d22d171cef4fe8993cbfb55 (patch) | |
tree | f113dc931a8677a31d9aa70e50953a2a08357cd3 /fs/afs/internal.h | |
parent | 445b10289f766b73527ecb4fb4e388677ad93740 (diff) | |
download | linux-cdfb26b40dfa51127d22d171cef4fe8993cbfb55.tar.xz |
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: 0fafdc9f888b ("afs: Fix file locking")
Reported-by: Jonathan Billings <jsbillin@umich.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 6e680783f59f..5eb6be3f73b2 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -599,6 +599,7 @@ enum afs_lock_state { AFS_VNODE_LOCK_EXTENDING, /* We're extending a lock on the server */ AFS_VNODE_LOCK_NEED_UNLOCK, /* We need to unlock on the server */ AFS_VNODE_LOCK_UNLOCKING, /* We're telling the server to unlock */ + AFS_VNODE_LOCK_DELETED, /* The vnode has been deleted whilst we have a lock */ }; /* |