diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-08-15 03:32:54 +0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-08-22 00:57:01 +0400 |
commit | 764aa3e978020121cbb86111b5d8f42830015a06 (patch) | |
tree | df2e0f43245a452010aa184042e7da2306ed2e4b /fs/f2fs/dir.c | |
parent | 14f4e690857715d5e0cbe403b4cb8e8c904a6c15 (diff) | |
download | linux-764aa3e978020121cbb86111b5d8f42830015a06.tar.xz |
f2fs: avoid double lock in truncate_blocks
The init_inode_metadata calls truncate_blocks when error is occurred.
The callers holds f2fs_lock_op, so we should not call it again in
truncate_blocks.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index a69bbfa90c99..155fb056b7f1 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -391,7 +391,7 @@ put_error: error: /* once the failed inode becomes a bad inode, i_mode is S_IFREG */ truncate_inode_pages(&inode->i_data, 0); - truncate_blocks(inode, 0); + truncate_blocks(inode, 0, false); remove_dirty_dir_inode(inode); remove_inode_page(inode); return ERR_PTR(err); |