mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
ext4: simplify checking quota limits in ext4_statfs()
Coverity reports that conditions checking quota limits in ext4_statfs() contain dead code. Indeed it is right and current conditions can be simplified. Link: https://lore.kernel.org/r/[email protected] Reported-by: Coverity <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]> Cc: [email protected]
This commit is contained in:
1 parent
14c9ca0583
commit
46d36880d1
1 file changed
+2
-8
+2
-8
@@ -5585,10 +5585,7 @@ static int ext4_statfs_project(struct super_block *sb,
|
||||
return PTR_ERR(dquot);
|
||||
spin_lock(&dquot->dq_dqb_lock);
|
||||
|
||||
limit = 0;
|
||||
if (dquot->dq_dqb.dqb_bsoftlimit &&
|
||||
(!limit || dquot->dq_dqb.dqb_bsoftlimit < limit))
|
||||
limit = dquot->dq_dqb.dqb_bsoftlimit;
|
||||
limit = dquot->dq_dqb.dqb_bsoftlimit;
|
||||
if (dquot->dq_dqb.dqb_bhardlimit &&
|
||||
(!limit || dquot->dq_dqb.dqb_bhardlimit < limit))
|
||||
limit = dquot->dq_dqb.dqb_bhardlimit;
|
||||
@@ -5603,10 +5600,7 @@ static int ext4_statfs_project(struct super_block *sb,
|
||||
(buf->f_blocks - curblock) : 0;
|
||||
}
|
||||
|
||||
limit = 0;
|
||||
if (dquot->dq_dqb.dqb_isoftlimit &&
|
||||
(!limit || dquot->dq_dqb.dqb_isoftlimit < limit))
|
||||
limit = dquot->dq_dqb.dqb_isoftlimit;
|
||||
limit = dquot->dq_dqb.dqb_isoftlimit;
|
||||
if (dquot->dq_dqb.dqb_ihardlimit &&
|
||||
(!limit || dquot->dq_dqb.dqb_ihardlimit < limit))
|
||||
limit = dquot->dq_dqb.dqb_ihardlimit;
|
||||
|
||||
Reference in new issue
Block a user