diff options
Diffstat (limited to 'fs/quota')
-rw-r--r-- | fs/quota/dquot.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 531dee651ef7..12c233da1b6b 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -1495,11 +1495,13 @@ static void inode_decr_space(struct inode *inode, qsize_t number, int reserve) | |||
1495 | /* | 1495 | /* |
1496 | * This operation can block, but only after everything is updated | 1496 | * This operation can block, but only after everything is updated |
1497 | */ | 1497 | */ |
1498 | int __dquot_alloc_space(struct inode *inode, qsize_t number, | 1498 | int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags) |
1499 | int warn, int reserve) | ||
1500 | { | 1499 | { |
1501 | int cnt, ret = 0; | 1500 | int cnt, ret = 0; |
1502 | char warntype[MAXQUOTAS]; | 1501 | char warntype[MAXQUOTAS]; |
1502 | int warn = flags & DQUOT_SPACE_WARN; | ||
1503 | int reserve = flags & DQUOT_SPACE_RESERVE; | ||
1504 | int nofail = flags & DQUOT_SPACE_NOFAIL; | ||
1503 | 1505 | ||
1504 | /* | 1506 | /* |
1505 | * First test before acquiring mutex - solves deadlocks when we | 1507 | * First test before acquiring mutex - solves deadlocks when we |
@@ -1520,7 +1522,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, | |||
1520 | continue; | 1522 | continue; |
1521 | ret = check_bdq(inode->i_dquot[cnt], number, !warn, | 1523 | ret = check_bdq(inode->i_dquot[cnt], number, !warn, |
1522 | warntype+cnt); | 1524 | warntype+cnt); |
1523 | if (ret) { | 1525 | if (ret && !nofail) { |
1524 | spin_unlock(&dq_data_lock); | 1526 | spin_unlock(&dq_data_lock); |
1525 | goto out_flush_warn; | 1527 | goto out_flush_warn; |
1526 | } | 1528 | } |
@@ -1619,10 +1621,11 @@ EXPORT_SYMBOL(dquot_claim_space_nodirty); | |||
1619 | /* | 1621 | /* |
1620 | * This operation can block, but only after everything is updated | 1622 | * This operation can block, but only after everything is updated |
1621 | */ | 1623 | */ |
1622 | void __dquot_free_space(struct inode *inode, qsize_t number, int reserve) | 1624 | void __dquot_free_space(struct inode *inode, qsize_t number, int flags) |
1623 | { | 1625 | { |
1624 | unsigned int cnt; | 1626 | unsigned int cnt; |
1625 | char warntype[MAXQUOTAS]; | 1627 | char warntype[MAXQUOTAS]; |
1628 | int reserve = flags & DQUOT_SPACE_RESERVE; | ||
1626 | 1629 | ||
1627 | /* First test before acquiring mutex - solves deadlocks when we | 1630 | /* First test before acquiring mutex - solves deadlocks when we |
1628 | * re-enter the quota code and are already holding the mutex */ | 1631 | * re-enter the quota code and are already holding the mutex */ |