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>
This commit is contained in:
parent
1206d028b2
commit
df15a2a59d
|
@ -1663,7 +1663,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
|
||||||
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
|
for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
|
||||||
if (!dquots[cnt])
|
if (!dquots[cnt])
|
||||||
continue;
|
continue;
|
||||||
if (flags & DQUOT_SPACE_RESERVE) {
|
if (reserve) {
|
||||||
ret = dquot_add_space(dquots[cnt], 0, number, flags,
|
ret = dquot_add_space(dquots[cnt], 0, number, flags,
|
||||||
&warn[cnt]);
|
&warn[cnt]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1676,7 +1676,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
|
||||||
if (!dquots[cnt])
|
if (!dquots[cnt])
|
||||||
continue;
|
continue;
|
||||||
spin_lock(&dquots[cnt]->dq_dqb_lock);
|
spin_lock(&dquots[cnt]->dq_dqb_lock);
|
||||||
if (flags & DQUOT_SPACE_RESERVE) {
|
if (reserve) {
|
||||||
dquots[cnt]->dq_dqb.dqb_rsvspace -=
|
dquots[cnt]->dq_dqb.dqb_rsvspace -=
|
||||||
number;
|
number;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user