1 From: Jan Kara <jack@suse.cz>
2 References: fate#302681
3 Subject: [PATCH 03/28] quota: Remove bogus 'optimization' in check_idq() and check_bdq()
4 Patch-mainline: 2.6.29?
6 Checks like <= 0 for an unsigned type do not make much sence. The value
7 could be only 0 and that does not happen often enough for the check
10 Signed-off-by: Jan Kara <jack@suse.cz>
13 1 files changed, 2 insertions(+), 2 deletions(-)
15 diff --git a/fs/dquot.c b/fs/dquot.c
16 index 758bf4a..e95ad55 100644
19 @@ -1041,7 +1041,7 @@ static inline char ignore_hardlimit(struct dquot *dquot)
20 static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype)
22 *warntype = QUOTA_NL_NOWARN;
23 - if (inodes <= 0 || test_bit(DQ_FAKE_B, &dquot->dq_flags))
24 + if (test_bit(DQ_FAKE_B, &dquot->dq_flags))
27 if (dquot->dq_dqb.dqb_ihardlimit &&
28 @@ -1073,7 +1073,7 @@ static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype)
29 static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *warntype)
31 *warntype = QUOTA_NL_NOWARN;
32 - if (space <= 0 || test_bit(DQ_FAKE_B, &dquot->dq_flags))
33 + if (test_bit(DQ_FAKE_B, &dquot->dq_flags))
36 if (dquot->dq_dqb.dqb_bhardlimit &&