diff options
author | David Howells <dhowells@redhat.com> | 2022-02-25 11:19:14 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2022-06-10 20:55:21 +0100 |
commit | 40a81101202300df7db273f77dda9fbe6271b1d2 (patch) | |
tree | 7d3590b1bc71454d1a685fff0855889393c00403 /fs/ceph | |
parent | e81fb4198e27925b151aad1450e0fd607d6733f8 (diff) | |
download | linux-40a81101202300df7db273f77dda9fbe6271b1d2.tar.bz2 |
netfs: Rename the netfs_io_request cleanup op and give it an op pointer
The netfs_io_request cleanup op is now always in a position to be given a
pointer to a netfs_io_request struct, so this can be passed in instead of
the mapping and private data arguments (both of which are included in the
struct).
So rename the ->cleanup op to ->free_request (to match ->init_request) and
pass in the I/O pointer.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 9763e7ea8148..6dee88815491 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -394,11 +394,10 @@ static int ceph_init_request(struct netfs_io_request *rreq, struct file *file) return 0; } -static void ceph_readahead_cleanup(struct address_space *mapping, void *priv) +static void ceph_netfs_free_request(struct netfs_io_request *rreq) { - struct inode *inode = mapping->host; - struct ceph_inode_info *ci = ceph_inode(inode); - int got = (uintptr_t)priv; + struct ceph_inode_info *ci = ceph_inode(rreq->inode); + int got = (uintptr_t)rreq->netfs_priv; if (got) ceph_put_cap_refs(ci, got); @@ -406,12 +405,12 @@ static void ceph_readahead_cleanup(struct address_space *mapping, void *priv) const struct netfs_request_ops ceph_netfs_ops = { .init_request = ceph_init_request, + .free_request = ceph_netfs_free_request, .begin_cache_operation = ceph_begin_cache_operation, .issue_read = ceph_netfs_issue_read, .expand_readahead = ceph_netfs_expand_readahead, .clamp_length = ceph_netfs_clamp_length, .check_write_begin = ceph_netfs_check_write_begin, - .cleanup = ceph_readahead_cleanup, }; #ifdef CONFIG_CEPH_FSCACHE |