summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-04-27 11:32:34 +0200
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 01:15:34 +0200
commita78600e7c4fb47fb5ef34265456b731fde27a9c3 (patch)
tree724fcddad82738b0ffefc4f29740e9ea69ed0de2 /fs/ceph/inode.c
parentceph: remove unnecessary checks in __dcache_readdir (diff)
downloadlinux-a78600e7c4fb47fb5ef34265456b731fde27a9c3.tar.xz
linux-a78600e7c4fb47fb5ef34265456b731fde27a9c3.zip
ceph: simplify 'offset in frag'
don't distinguish leftmost frag from other frags. always use 2 as first entry's offset. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/ceph/inode.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index b906e02cddad..51ce5ce59f04 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1405,10 +1405,7 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
dout("readdir_prepopulate got new frag %x -> %x\n",
frag, le32_to_cpu(rinfo->dir_dir->frag));
frag = le32_to_cpu(rinfo->dir_dir->frag);
- if (ceph_frag_is_leftmost(frag))
- req->r_readdir_offset = 2;
- else
- req->r_readdir_offset = 0;
+ req->r_readdir_offset = 2;
}
if (le32_to_cpu(rinfo->head->op) == CEPH_MDS_OP_LSSNAP) {