aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2009-09-28 15:49:52 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-09-28 15:49:52 -0400
commit9f0ccfd8e07d61b413e6536ffa02fbf60d2e20d8 (patch)
treeb90ea9f8dc2542d029b15d94a0588b36937dbbab /fs
parent55138e0bc29c0751e2152df9ad35deea542f29b3 (diff)
downloadkernel_samsung_aries-9f0ccfd8e07d61b413e6536ffa02fbf60d2e20d8.zip
kernel_samsung_aries-9f0ccfd8e07d61b413e6536ffa02fbf60d2e20d8.tar.gz
kernel_samsung_aries-9f0ccfd8e07d61b413e6536ffa02fbf60d2e20d8.tar.bz2
ext4: release reserved quota when block reservation for delalloc retry
ext4_da_reserve_space() can reserve quota blocks multiple times if ext4_claim_free_blocks() fail and we retry the allocation. We should release the quota reservation before restarting. Bug found by Jan Kara. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 20e2d70..219067c 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1854,11 +1854,11 @@ repeat:
if (ext4_claim_free_blocks(sbi, total)) {
spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
+ vfs_dq_release_reservation_block(inode, total);
if (ext4_should_retry_alloc(inode->i_sb, &retries)) {
yield();
goto repeat;
}
- vfs_dq_release_reservation_block(inode, total);
return -ENOSPC;
}
EXT4_I(inode)->i_reserved_data_blocks += nrblocks;