Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6da5246d authored by Yan, Zheng's avatar Yan, Zheng Committed by Sage Weil
Browse files

ceph: use fpos_cmp() to compare dentry positions

parent 0081bd83
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -141,7 +141,7 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx,


	/* start at beginning? */
	/* start at beginning? */
	if (ctx->pos == 2 || last == NULL ||
	if (ctx->pos == 2 || last == NULL ||
	    ctx->pos < ceph_dentry(last)->offset) {
	    fpos_cmp(ctx->pos, ceph_dentry(last)->offset) < 0) {
		if (list_empty(&parent->d_subdirs))
		if (list_empty(&parent->d_subdirs))
			goto out_unlock;
			goto out_unlock;
		p = parent->d_subdirs.prev;
		p = parent->d_subdirs.prev;