summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2019-03-20 01:03:59 -0400
committerJan Kara <jack@suse.cz>2019-03-26 06:21:23 -0400
commitdf15a2a59d0b29d86e17140b83ed231adaded12f (patch)
tree205eee37333832a0ca306ee379312a07981c1099
parent1206d028b2c8f159506e0efd6dad66aca82e8de8 (diff)
quota: code cleanup for __dquot_alloc_space()
Replace (flags & DQUOT_SPACE_RESERVE) with variable reserve. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/quota/dquot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index fc20e06c56ba..00de508f9d2e 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -1663,7 +1663,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
1663 for (cnt = 0; cnt < MAXQUOTAS; cnt++) { 1663 for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
1664 if (!dquots[cnt]) 1664 if (!dquots[cnt])
1665 continue; 1665 continue;
1666 if (flags & DQUOT_SPACE_RESERVE) { 1666 if (reserve) {
1667 ret = dquot_add_space(dquots[cnt], 0, number, flags, 1667 ret = dquot_add_space(dquots[cnt], 0, number, flags,
1668 &warn[cnt]); 1668 &warn[cnt]);
1669 } else { 1669 } else {
@@ -1676,7 +1676,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
1676 if (!dquots[cnt]) 1676 if (!dquots[cnt])
1677 continue; 1677 continue;
1678 spin_lock(&dquots[cnt]->dq_dqb_lock); 1678 spin_lock(&dquots[cnt]->dq_dqb_lock);
1679 if (flags & DQUOT_SPACE_RESERVE) { 1679 if (reserve) {
1680 dquots[cnt]->dq_dqb.dqb_rsvspace -= 1680 dquots[cnt]->dq_dqb.dqb_rsvspace -=
1681 number; 1681 number;
1682 } else { 1682 } else {