path: root/fs/afs/dir_silly.c
diff options
authorDavid Howells <>2020-06-16 00:34:09 +0100
committerDavid Howells <>2020-06-16 16:26:57 +0100
commit728279a5a1fd9fa9fa268f807391c4d19ad2822c (patch)
tree14449edf632b36d26b200931233b844fdaab9683 /fs/afs/dir_silly.c
parent44767c353127cfcbee49a89bab39a3680ecd2a45 (diff)
afs: Fix use of afs_check_for_remote_deletion()
afs_check_for_remote_deletion() checks to see if error ENOENT is returned by the server in response to an operation and, if so, marks the primary vnode as having been deleted as the FID is no longer valid. However, it's being called from the operation success functions, where no abort has happened - and if an inline abort is recorded, it's handled by afs_vnode_commit_status(). Fix this by actually calling the operation aborted method if provided and having that point to afs_check_for_remote_deletion(). Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: David Howells <>
Diffstat (limited to 'fs/afs/dir_silly.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/dir_silly.c b/fs/afs/dir_silly.c
index b14e3d9a25e2..001adb87ff23 100644
--- a/fs/afs/dir_silly.c
+++ b/fs/afs/dir_silly.c
@@ -151,7 +151,6 @@ static void afs_silly_unlink_success(struct afs_operation *op)
struct afs_vnode *vnode = op->file[1].vnode;
_enter("op=%08x", op->debug_id);
- afs_check_for_remote_deletion(op, op->file[0].vnode);
afs_vnode_commit_status(op, &op->file[0]);
afs_vnode_commit_status(op, &op->file[1]);
afs_update_dentry_version(op, &op->file[0], op->dentry);
@@ -181,6 +180,7 @@ static const struct afs_operation_ops afs_silly_unlink_operation = {
.issue_afs_rpc = afs_fs_remove_file,
.issue_yfs_rpc = yfs_fs_remove_file,
.success = afs_silly_unlink_success,
+ .aborted = afs_check_for_remote_deletion,
.edit_dir = afs_silly_unlink_edit_dir,