aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDarrick J. Wong2020-07-14 10:37:34 -0700
committerDarrick J. Wong2020-07-28 20:24:14 -0700
commit12d720fb864547922ad4bf53120de72a91807999 (patch)
tree8312a4d4f4a6521fbf019833a55e61071d8c6940 /fs
parentd92c881538c40a18d0a86193898fc0b6e2598aa0 (diff)
xfs: assume the default quota limits are always set in xfs_qm_adjust_dqlimits
We always initialize the default quota limits to something nowadays, so we don't need to check that the defaults are set to something before using them. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_dquot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 98cb31f28aaf..8e84623cc331 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -77,21 +77,21 @@ xfs_qm_adjust_dqlimits(
ASSERT(dq->q_id);
defq = xfs_get_defquota(q, xfs_dquot_type(dq));
- if (defq->blk.soft && !dq->q_blk.softlimit) {
+ if (!dq->q_blk.softlimit) {
dq->q_blk.softlimit = defq->blk.soft;
prealloc = 1;
}
- if (defq->blk.hard && !dq->q_blk.hardlimit) {
+ if (!dq->q_blk.hardlimit) {
dq->q_blk.hardlimit = defq->blk.hard;
prealloc = 1;
}
- if (defq->ino.soft && !dq->q_ino.softlimit)
+ if (!dq->q_ino.softlimit)
dq->q_ino.softlimit = defq->ino.soft;
- if (defq->ino.hard && !dq->q_ino.hardlimit)
+ if (!dq->q_ino.hardlimit)
dq->q_ino.hardlimit = defq->ino.hard;
- if (defq->rtb.soft && !dq->q_rtb.softlimit)
+ if (!dq->q_rtb.softlimit)
dq->q_rtb.softlimit = defq->rtb.soft;
- if (defq->rtb.hard && !dq->q_rtb.hardlimit)
+ if (!dq->q_rtb.hardlimit)
dq->q_rtb.hardlimit = defq->rtb.hard;
if (prealloc)