mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
ext4: use ext4_update_i_disksize instead of opencoded ones
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
52c826db6d
commit
ee124d2746
1 changed files with 1 additions and 4 deletions
|
@ -2651,10 +2651,7 @@ static int ext4_da_write_end(struct file *file,
|
|||
if (copied && new_i_size > EXT4_I(inode)->i_disksize) {
|
||||
if (ext4_has_inline_data(inode) ||
|
||||
ext4_da_should_update_i_disksize(page, end)) {
|
||||
down_write(&EXT4_I(inode)->i_data_sem);
|
||||
if (new_i_size > EXT4_I(inode)->i_disksize)
|
||||
EXT4_I(inode)->i_disksize = new_i_size;
|
||||
up_write(&EXT4_I(inode)->i_data_sem);
|
||||
ext4_update_i_disksize(inode, new_i_size);
|
||||
/* We need to mark inode dirty even if
|
||||
* new_i_size is less that inode->i_size
|
||||
* bu greater than i_disksize.(hint delalloc)
|
||||
|
|
Loading…
Reference in a new issue