diff options
author | Jan Kara <jack@suse.cz> | 2008-08-20 09:49:59 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:36:56 -0500 |
commit | 1497d3ad487b64eeea83ac203263802755438949 (patch) | |
tree | 8862803a3b25a829985351608ccc9460f056c33f /fs/dquot.c | |
parent | 12095460f7f315f8ef67a55b2194195d325d48d7 (diff) |
quota: Remove bogus 'optimization' in check_idq() and check_bdq()
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>
Diffstat (limited to 'fs/dquot.c')
-rw-r--r-- | fs/dquot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dquot.c b/fs/dquot.c index c02223b6aeb2..c88330602ddd 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -1041,7 +1041,7 @@ static inline char ignore_hardlimit(struct dquot *dquot) | |||
1041 | static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype) | 1041 | static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype) |
1042 | { | 1042 | { |
1043 | *warntype = QUOTA_NL_NOWARN; | 1043 | *warntype = QUOTA_NL_NOWARN; |
1044 | if (inodes <= 0 || test_bit(DQ_FAKE_B, &dquot->dq_flags)) | 1044 | if (test_bit(DQ_FAKE_B, &dquot->dq_flags)) |
1045 | return QUOTA_OK; | 1045 | return QUOTA_OK; |
1046 | 1046 | ||
1047 | if (dquot->dq_dqb.dqb_ihardlimit && | 1047 | if (dquot->dq_dqb.dqb_ihardlimit && |
@@ -1073,7 +1073,7 @@ static int check_idq(struct dquot *dquot, qsize_t inodes, char *warntype) | |||
1073 | static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *warntype) | 1073 | static int check_bdq(struct dquot *dquot, qsize_t space, int prealloc, char *warntype) |
1074 | { | 1074 | { |
1075 | *warntype = QUOTA_NL_NOWARN; | 1075 | *warntype = QUOTA_NL_NOWARN; |
1076 | if (space <= 0 || test_bit(DQ_FAKE_B, &dquot->dq_flags)) | 1076 | if (test_bit(DQ_FAKE_B, &dquot->dq_flags)) |
1077 | return QUOTA_OK; | 1077 | return QUOTA_OK; |
1078 | 1078 | ||
1079 | if (dquot->dq_dqb.dqb_bhardlimit && | 1079 | if (dquot->dq_dqb.dqb_bhardlimit && |