summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-06-08 11:11:20 +0200
committerJan Kara <jack@suse.cz>2012-06-08 11:15:13 +0200
commit6ba6546dd167297cb9ed69d0257ee245b0faea47 (patch)
treee7e90386be40aa636a11864bafe95704f379702d
parente7cdf879468501b1be6c3ab9add1c9ec056093ab (diff)
downloadlinuxquota-6ba6546dd167297cb9ed69d0257ee245b0faea47.tar.gz
repquota: Fix reporting for XFS
Conversion to generic quota scanning introduced a bug for XFS where we stopped scanning after quotactl reported first error. quotactl for XFS however reports ENOENT when it has nothing to report for a particular user / group and we shouldn't stop scanning after that. We tried to test for this but the test was wrong. Fix it. Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--quotaio_xfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quotaio_xfs.c b/quotaio_xfs.c
index 2e879e6..903c03e 100644
--- a/quotaio_xfs.c
+++ b/quotaio_xfs.c
@@ -183,9 +183,9 @@ static int xfs_get_dquot(struct dquot *dq)
memset(&d, 0, sizeof(d));
ret = quotactl(qcmd, dq->dq_h->qh_quotadev, dq->dq_id, (void *)&d);
if (ret < 0) {
- if (ret == -ENOENT)
+ if (errno == ENOENT)
return 0;
- return ret;
+ return -1;
}
xfs_kern2utildqblk(&dq->dq_dqb, &d);
return 0;