diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2014-08-30 23:34:06 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-08-30 23:34:06 -0400 |
commit | ee124d2746250786b306952bb8955d3171fa8e69 (patch) | |
tree | 500eae8e60d538ed5e5a665c1f08a0fd93040465 /fs/ext4/inode.c | |
parent | 52c826db6d4b638677683c79e6c465b99074be74 (diff) | |
download | op-kernel-dev-ee124d2746250786b306952bb8955d3171fa8e69.zip op-kernel-dev-ee124d2746250786b306952bb8955d3171fa8e69.tar.gz |
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>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 8aa241a..cc95dca 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -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) |