diff options
author | Yunlei He <heyunlei@huawei.com> | 2017-02-23 20:31:20 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-02-27 09:59:55 -0800 |
commit | dd7b2333e6cd31584682382fcf0a1c1e5140b936 (patch) | |
tree | 8e964af3d31d138de3cdc3a306a3e862d83ebe59 /fs/f2fs | |
parent | 22ad0b6ab46683975c6da032f1c2593066c7b3bd (diff) | |
download | linux-stable-dd7b2333e6cd31584682382fcf0a1c1e5140b936.tar.gz linux-stable-dd7b2333e6cd31584682382fcf0a1c1e5140b936.tar.bz2 linux-stable-dd7b2333e6cd31584682382fcf0a1c1e5140b936.zip |
f2fs: no need lock_op in f2fs_write_inline_data
Similar as f2fs_write_inode, f2fs_write_inline_data just
mark inode page dirty, so it's no need to write inline data
under read lock of cp_rwsem.
Signed-off-by: Yunlei He <heyunlei@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 80f9863dc4b0..9e51c5e40ce1 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1414,9 +1414,12 @@ write: goto redirty_out; err = -EAGAIN; - f2fs_lock_op(sbi); - if (f2fs_has_inline_data(inode)) + if (f2fs_has_inline_data(inode)) { err = f2fs_write_inline_data(inode, page); + if (!err) + goto out; + } + f2fs_lock_op(sbi); if (err == -EAGAIN) err = do_write_data_page(&fio); if (F2FS_I(inode)->last_disk_size < psize) |