diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 1e11ed716f853550b4a076a89dc5ddad6f4ea7c3..5f67728ba4d7947a965ce3d2096b8799a436ef41 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -336,7 +336,10 @@ static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir) if (req->r_reply_info.dir_end) { kfree(fi->last_name); fi->last_name = NULL; - fi->next_offset = 2; + if (ceph_frag_is_rightmost(frag)) + fi->next_offset = 2; + else + fi->next_offset = 0; } else { rinfo = &req->r_reply_info; err = note_last_dentry(fi,