From: Yan, Zheng Date: Wed, 9 Apr 2014 01:35:19 +0000 (+0800) Subject: ceph: use fpos_cmp() to compare dentry positions X-Git-Tag: firefly_0821_release~176^2~3948^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6da5246dd4b077ab229481ca342802f7fdcdab59;p=firefly-linux-kernel-4.4.55.git ceph: use fpos_cmp() to compare dentry positions Signed-off-by: Yan, Zheng Reviewed-by: Sage Weil --- diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 8c7f90b96913..fb4f7a203eda 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -141,7 +141,7 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx, /* start at beginning? */ 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)) goto out_unlock; p = parent->d_subdirs.prev;