aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 2858ac09f5a3..bd4df9d379b2 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5438,6 +5438,7 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
5438 struct inode *inode = sb_dqopt(sb)->files[type]; 5438 struct inode *inode = sb_dqopt(sb)->files[type];
5439 ext4_lblk_t blk = off >> EXT4_BLOCK_SIZE_BITS(sb); 5439 ext4_lblk_t blk = off >> EXT4_BLOCK_SIZE_BITS(sb);
5440 int err, offset = off & (sb->s_blocksize - 1); 5440 int err, offset = off & (sb->s_blocksize - 1);
5441 int retries = 0;
5441 struct buffer_head *bh; 5442 struct buffer_head *bh;
5442 handle_t *handle = journal_current_handle(); 5443 handle_t *handle = journal_current_handle();
5443 5444
@@ -5458,7 +5459,12 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
5458 return -EIO; 5459 return -EIO;
5459 } 5460 }
5460 5461
5461 bh = ext4_bread(handle, inode, blk, 1); 5462 do {
5463 bh = ext4_bread(handle, inode, blk,
5464 EXT4_GET_BLOCKS_CREATE |
5465 EXT4_GET_BLOCKS_METADATA_NOFAIL);
5466 } while (IS_ERR(bh) && (PTR_ERR(bh) == -ENOSPC) &&
5467 ext4_should_retry_alloc(inode->i_sb, &retries));
5462 if (IS_ERR(bh)) 5468 if (IS_ERR(bh))
5463 return PTR_ERR(bh); 5469 return PTR_ERR(bh);
5464 if (!bh) 5470 if (!bh)