summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-01-17 14:32:12 -0500
committerIlya Dryomov <idryomov@gmail.com>2022-03-01 18:26:36 +0100
commita25cedb4313d35e1f2968105678a47ca28e84d3b (patch)
tree5f5db3f5a6756d9b8dba97c078c064a55e66c9fa /fs/ceph
parent7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3 (diff)
ceph: switch netfs read ops to use rreq->inode instead of rreq->mapping->host
One fewer pointer dereference, and in the future we may not be able to count on the mapping pointer being populated (e.g. in the DIO case). Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/addr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index c98e5238a1b6..d3969fb11c59 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -185,7 +185,7 @@ static int ceph_releasepage(struct page *page, gfp_t gfp)
static void ceph_netfs_expand_readahead(struct netfs_read_request *rreq)
{
- struct inode *inode = rreq->mapping->host;
+ struct inode *inode = rreq->inode;
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_file_layout *lo = &ci->i_layout;
u32 blockoff;
@@ -202,7 +202,7 @@ static void ceph_netfs_expand_readahead(struct netfs_read_request *rreq)
static bool ceph_netfs_clamp_length(struct netfs_read_subrequest *subreq)
{
- struct inode *inode = subreq->rreq->mapping->host;
+ struct inode *inode = subreq->rreq->inode;
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
struct ceph_inode_info *ci = ceph_inode(inode);
u64 objno, objoff;
@@ -248,7 +248,7 @@ static void finish_netfs_read(struct ceph_osd_request *req)
static void ceph_netfs_issue_op(struct netfs_read_subrequest *subreq)
{
struct netfs_read_request *rreq = subreq->rreq;
- struct inode *inode = rreq->mapping->host;
+ struct inode *inode = rreq->inode;
struct ceph_inode_info *ci = ceph_inode(inode);
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
struct ceph_osd_request *req;