diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 22546ad7f0ae..35ff9fef68bd 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -4614,11 +4614,24 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id, | |||
4614 | 4614 | ||
4615 | static int ext4_quota_off(struct super_block *sb, int type) | 4615 | static int ext4_quota_off(struct super_block *sb, int type) |
4616 | { | 4616 | { |
4617 | struct inode *inode = sb_dqopt(sb)->files[type]; | ||
4618 | handle_t *handle; | ||
4619 | |||
4617 | /* Force all delayed allocation blocks to be allocated. | 4620 | /* Force all delayed allocation blocks to be allocated. |
4618 | * Caller already holds s_umount sem */ | 4621 | * Caller already holds s_umount sem */ |
4619 | if (test_opt(sb, DELALLOC)) | 4622 | if (test_opt(sb, DELALLOC)) |
4620 | sync_filesystem(sb); | 4623 | sync_filesystem(sb); |
4621 | 4624 | ||
4625 | /* Update modification times of quota files when userspace can | ||
4626 | * start looking at them */ | ||
4627 | handle = ext4_journal_start(inode, 1); | ||
4628 | if (IS_ERR(handle)) | ||
4629 | goto out; | ||
4630 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | ||
4631 | ext4_mark_inode_dirty(handle, inode); | ||
4632 | ext4_journal_stop(handle); | ||
4633 | |||
4634 | out: | ||
4622 | return dquot_quota_off(sb, type); | 4635 | return dquot_quota_off(sb, type); |
4623 | } | 4636 | } |
4624 | 4637 | ||
@@ -4714,9 +4727,8 @@ out: | |||
4714 | if (inode->i_size < off + len) { | 4727 | if (inode->i_size < off + len) { |
4715 | i_size_write(inode, off + len); | 4728 | i_size_write(inode, off + len); |
4716 | EXT4_I(inode)->i_disksize = inode->i_size; | 4729 | EXT4_I(inode)->i_disksize = inode->i_size; |
4730 | ext4_mark_inode_dirty(handle, inode); | ||
4717 | } | 4731 | } |
4718 | inode->i_mtime = inode->i_ctime = CURRENT_TIME; | ||
4719 | ext4_mark_inode_dirty(handle, inode); | ||
4720 | mutex_unlock(&inode->i_mutex); | 4732 | mutex_unlock(&inode->i_mutex); |
4721 | return len; | 4733 | return len; |
4722 | } | 4734 | } |