diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-28 22:48:11 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-30 19:14:19 +0100 |
commit | 819d9153d4c87329910a4cb01198610cd24ec62d (patch) | |
tree | df82ff97cd10ea8db631941a96db925d124e0b00 /fs/f2fs | |
parent | f2fs: early check broken symlink length in the encrypted case (diff) | |
download | linux-819d9153d4c87329910a4cb01198610cd24ec62d.tar.xz linux-819d9153d4c87329910a4cb01198610cd24ec62d.zip |
f2fs: use i_size_read to get i_size
We need to use i_size_read() to get inode->i_size.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 6fbfc70ac8a0..14b40a9db5b3 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1386,10 +1386,11 @@ skip_write: static void f2fs_write_failed(struct address_space *mapping, loff_t to) { struct inode *inode = mapping->host; + loff_t i_size = i_size_read(inode); - if (to > inode->i_size) { - truncate_pagecache(inode, inode->i_size); - truncate_blocks(inode, inode->i_size, true); + if (to > i_size) { + truncate_pagecache(inode, i_size); + truncate_blocks(inode, i_size, true); } } |