aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-06-16 00:34:09 +0100
committerDavid Howells <dhowells@redhat.com>2020-06-16 16:26:57 +0100
commit728279a5a1fd9fa9fa268f807391c4d19ad2822c (patch)
tree14449edf632b36d26b200931233b844fdaab9683 /fs/afs/internal.h
parentafs: Remove afs_operation::abort_code (diff)
downloadlinux-dev-728279a5a1fd9fa9fa268f807391c4d19ad2822c.tar.xz
linux-dev-728279a5a1fd9fa9fa268f807391c4d19ad2822c.zip
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 <dhowells@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/afs/internal.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 598934d923cc..9420890e3577 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -934,6 +934,7 @@ extern const struct address_space_operations afs_dir_aops;
extern const struct dentry_operations afs_fs_dentry_operations;
extern void afs_d_release(struct dentry *);
+extern void afs_check_for_remote_deletion(struct afs_operation *);
/*
* dir_edit.c
@@ -1482,15 +1483,6 @@ static inline struct inode *AFS_VNODE_TO_I(struct afs_vnode *vnode)
return &vnode->vfs_inode;
}
-static inline void afs_check_for_remote_deletion(struct afs_operation *op,
- struct afs_vnode *vnode)
-{
- if (op->error == -ENOENT) {
- set_bit(AFS_VNODE_DELETED, &vnode->flags);
- afs_break_callback(vnode, afs_cb_break_for_deleted);
- }
-}
-
/*
* Note that a dentry got changed. We need to set d_fsdata to the data version
* number derived from the result of the operation. It doesn't matter if