提交 c92737ce 编写于 作者: J Jaegeuk Kim

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: NJaegeuk Kim <jaegeuk@kernel.org>
上级 36abef4e
...@@ -450,9 +450,6 @@ struct page *init_inode_metadata(struct inode *inode, struct inode *dir, ...@@ -450,9 +450,6 @@ struct page *init_inode_metadata(struct inode *inode, struct inode *dir,
return page; return page;
put_error: put_error:
/* truncate empty dir pages */
truncate_inode_pages(&inode->i_data, 0);
clear_nlink(inode); clear_nlink(inode);
update_inode(inode, page); update_inode(inode, page);
f2fs_put_page(page, 1); f2fs_put_page(page, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册