]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.suse/quota-Remove-bogus-optimization-in-check_idq-an.patch
Reenabled linux-xen and xen-image build
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / quota-Remove-bogus-optimization-in-check_idq-an.patch
CommitLineData
00e5a55c
BS
1From: Jan Kara <jack@suse.cz>
2References: fate#302681
3Subject: [PATCH 03/28] quota: Remove bogus 'optimization' in check_idq() and check_bdq()
4Patch-mainline: 2.6.29?
5
6Checks like <= 0 for an unsigned type do not make much sence. The value
7could be only 0 and that does not happen often enough for the check
8to be worth it.
9
10Signed-off-by: Jan Kara <jack@suse.cz>
11---
12 fs/dquot.c | 4 ++--
13 1 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/fs/dquot.c b/fs/dquot.c
16index 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--
381.5.2.4
39