]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
quota: Remove bogus 'optimization' in check_idq() and check_bdq()
authorJan Kara <jack@suse.cz>
Wed, 20 Aug 2008 13:49:59 +0000 (15:49 +0200)
committerMark Fasheh <mfasheh@suse.com>
Mon, 5 Jan 2009 16:36:56 +0000 (08:36 -0800)
Checks like <= 0 for an unsigned type do not make much sence. The value
could be only 0 and that does not happen often enough for the check
to be worth it.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/dquot.c

index c02223b6aeb209e4859b24b024c834d62f632f42..c88330602ddd4a9ce909352138898208d380ec8c 100644 (file)
@@ -1041,7 +1041,7 @@ static inline char ignore_hardlimit(struct dquot *dquot)
 static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype)
 {
        *warntype = QUOTA_NL_NOWARN;
-       if (inodes <= 0 || test_bit(DQ_FAKE_B, &dquot->dq_flags))
+       if (test_bit(DQ_FAKE_B, &dquot->dq_flags))
                return QUOTA_OK;
 
        if (dquot->dq_dqb.dqb_ihardlimit &&
@@ -1073,7 +1073,7 @@ static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype)
 static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *warntype)
 {
        *warntype = QUOTA_NL_NOWARN;
-       if (space <= 0 || test_bit(DQ_FAKE_B, &dquot->dq_flags))
+       if (test_bit(DQ_FAKE_B, &dquot->dq_flags))
                return QUOTA_OK;
 
        if (dquot->dq_dqb.dqb_bhardlimit &&