7c70fe1
From 6ba6546dd167297cb9ed69d0257ee245b0faea47 Mon Sep 17 00:00:00 2001
7c70fe1
From: Jan Kara <jack@suse.cz>
7c70fe1
Date: Fri, 8 Jun 2012 11:11:20 +0200
7c70fe1
Subject: [PATCH 2/2] repquota: Fix reporting for XFS
7c70fe1
7c70fe1
Conversion to generic quota scanning introduced a bug for XFS where we
7c70fe1
stopped scanning after quotactl reported first error. quotactl for XFS
7c70fe1
however reports ENOENT when it has nothing to report for a particular user
7c70fe1
/ group and we shouldn't stop scanning after that. We tried to test for this
7c70fe1
but the test was wrong. Fix it.
7c70fe1
7c70fe1
Signed-off-by: Jan Kara <jack@suse.cz>
7c70fe1
---
7c70fe1
 quotaio_xfs.c |    4 ++--
7c70fe1
 1 files changed, 2 insertions(+), 2 deletions(-)
7c70fe1
7c70fe1
diff --git a/quotaio_xfs.c b/quotaio_xfs.c
7c70fe1
index 2e879e6..903c03e 100644
7c70fe1
--- a/quotaio_xfs.c
7c70fe1
+++ b/quotaio_xfs.c
7c70fe1
@@ -183,9 +183,9 @@ static int xfs_get_dquot(struct dquot *dq)
7c70fe1
 	memset(&d, 0, sizeof(d));
7c70fe1
 	ret = quotactl(qcmd, dq->dq_h->qh_quotadev, dq->dq_id, (void *)&d);
7c70fe1
 	if (ret < 0) {
7c70fe1
-		if (ret == -ENOENT)
7c70fe1
+		if (errno == ENOENT)
7c70fe1
 			return 0;
7c70fe1
-		return ret;
7c70fe1
+		return -1;
7c70fe1
 	}
7c70fe1
 	xfs_kern2utildqblk(&dq->dq_dqb, &d);
7c70fe1
 	return 0;
7c70fe1
-- 
7c70fe1
1.7.7.6
7c70fe1