summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-06-07 14:34:22 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2016-06-13 11:55:25 -0700
commitc92737ceecaf24643cc58182afdf9b13074cfb0d (patch)
tree064b882effce88b850413ebf231aeb24ea4c2f8f /fs
parent36abef4e796d382e81a0c2d21ea5327481dd7154 (diff)
downloadlinux-c92737ceecaf24643cc58182afdf9b13074cfb0d.tar.bz2
f2fs: fix deadlock in add_link failure
mkdir sync_dirty_inode - init_inode_metadata - lock_page(node) - make_empty_dir - filemap_fdatawrite() - do_writepages - lock_page(data) - write_page(data) - lock_page(node) - f2fs_init_acl - error - truncate_inode_pages - lock_page(data) So, we don't need to truncate data pages in this error case, which will be done by f2fs_evict_inode. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/dir.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index f6ab3c2f8145..486482468abb 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -450,9 +450,6 @@ struct page *init_inode_metadata(struct inode *inode, struct inode *dir,
return page;
put_error:
- /* truncate empty dir pages */
- truncate_inode_pages(&inode->i_data, 0);
-
clear_nlink(inode);
update_inode(inode, page);
f2fs_put_page(page, 1);