diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-10-13 22:42:53 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-03 19:07:33 -0500 |
commit | bce8d1120707c06088928b2ee52a58703d74ac29 (patch) | |
tree | c9320f0274a9eabcc163f9d16dcd163ba3a304bb /fs/f2fs/f2fs.h | |
parent | 59a0615540812297e4ff9673de5c1269413d0c40 (diff) |
f2fs: avoid deadlock on init_inode_metadata
Previously, init_inode_metadata does not hold any parent directory's inode
page. So, f2fs_init_acl can grab its parent inode page without any problem.
But, when we use inline_dentry, that page is grabbed during f2fs_add_link,
so that we can fall into deadlock condition like below.
INFO: task mknod:11006 blocked for more than 120 seconds.
Tainted: G OE 3.17.0-rc1+ #13
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
mknod D ffff88003fc94580 0 11006 11004 0x00000000
ffff880007717b10 0000000000000002 ffff88003c323220 ffff880007717fd8
0000000000014580 0000000000014580 ffff88003daecb30 ffff88003c323220
ffff88003fc94e80 ffff88003ffbb4e8 ffff880007717ba0 0000000000000002
Call Trace:
[<ffffffff8173dc40>] ? bit_wait+0x50/0x50
[<ffffffff8173d4cd>] io_schedule+0x9d/0x130
[<ffffffff8173dc6c>] bit_wait_io+0x2c/0x50
[<ffffffff8173da3b>] __wait_on_bit_lock+0x4b/0xb0
[<ffffffff811640a7>] __lock_page+0x67/0x70
[<ffffffff810acf50>] ? autoremove_wake_function+0x40/0x40
[<ffffffff811652cc>] pagecache_get_page+0x14c/0x1e0
[<ffffffffa029afa9>] get_node_page+0x59/0x130 [f2fs]
[<ffffffffa02a63ad>] read_all_xattrs+0x24d/0x430 [f2fs]
[<ffffffffa02a6ca2>] f2fs_getxattr+0x52/0xe0 [f2fs]
[<ffffffffa02a7481>] f2fs_get_acl+0x41/0x2d0 [f2fs]
[<ffffffff8122d847>] get_acl+0x47/0x70
[<ffffffff8122db5a>] posix_acl_create+0x5a/0x150
[<ffffffffa02a7759>] f2fs_init_acl+0x29/0xcb [f2fs]
[<ffffffffa0286a8d>] init_inode_metadata+0x5d/0x340 [f2fs]
[<ffffffffa029253a>] f2fs_add_inline_entry+0x12a/0x2e0 [f2fs]
[<ffffffffa0286ea5>] __f2fs_add_link+0x45/0x4a0 [f2fs]
[<ffffffffa028b5b6>] ? f2fs_new_inode+0x146/0x220 [f2fs]
[<ffffffffa028b816>] f2fs_mknod+0x86/0xf0 [f2fs]
[<ffffffff811e3ec1>] vfs_mknod+0xe1/0x160
[<ffffffff811e4b26>] SyS_mknod+0x1f6/0x200
[<ffffffff81741d7f>] tracesys+0xe1/0xe6
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 6aad6e03d621..d4dcd934756e 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -1247,7 +1247,7 @@ void set_de_type(struct f2fs_dir_entry *, struct inode *); | |||
1247 | struct f2fs_dir_entry *find_target_dentry(struct qstr *, int *, const void *, | 1247 | struct f2fs_dir_entry *find_target_dentry(struct qstr *, int *, const void *, |
1248 | struct f2fs_dir_entry *, __u8 (*)[F2FS_SLOT_LEN]); | 1248 | struct f2fs_dir_entry *, __u8 (*)[F2FS_SLOT_LEN]); |
1249 | struct page *init_inode_metadata(struct inode *, struct inode *, | 1249 | struct page *init_inode_metadata(struct inode *, struct inode *, |
1250 | const struct qstr *); | 1250 | const struct qstr *, struct page *); |
1251 | void update_parent_metadata(struct inode *, struct inode *, unsigned int); | 1251 | void update_parent_metadata(struct inode *, struct inode *, unsigned int); |
1252 | int room_for_filename(const void *, int, int); | 1252 | int room_for_filename(const void *, int, int); |
1253 | void f2fs_drop_nlink(struct inode *, struct inode *, struct page *); | 1253 | void f2fs_drop_nlink(struct inode *, struct inode *, struct page *); |