]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
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? | |
5 | ||
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 | |
8 | to be worth it. | |
9 | ||
10 | Signed-off-by: Jan Kara <jack@suse.cz> | |
11 | --- | |
12 | fs/dquot.c | 4 ++-- | |
13 | 1 files changed, 2 insertions(+), 2 deletions(-) | |
14 | ||
15 | diff --git a/fs/dquot.c b/fs/dquot.c | |
16 | index 758bf4a..e95ad55 100644 | |
17 | --- a/fs/dquot.c | |
18 | +++ b/fs/dquot.c | |
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) | |
21 | { | |
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)) | |
25 | return QUOTA_OK; | |
26 | ||
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) | |
30 | { | |
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)) | |
34 | return QUOTA_OK; | |
35 | ||
36 | if (dquot->dq_dqb.dqb_bhardlimit && | |
37 | -- | |
38 | 1.5.2.4 | |
39 |