Skip to content

Commit

Permalink
ceph: switch netfs read ops to use rreq->inode instead of rreq->mappi…
Browse files Browse the repository at this point in the history
…ng->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>
  • Loading branch information
Jeff Layton authored and Ilya Dryomov committed Mar 1, 2022
1 parent 7e57714 commit a25cedb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a25cedb

Please sign in to comment.