Trond Myklebust
bb6fbc4548
NFS: Avoid a deadlock in nfs_release_page
J.R. Okajima reports the following deadlock:
INFO: task kswapd0:305 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kswapd0 D 0000000000000001 0 305 2 0x00000000
ffff88001f21d4f0 0000000000000046 ffff88001fdea680 ffff88001f21c000
ffff88001f21dfd8 ffff88001f21c000 ffff88001f21dfd8 ffff88001f21dfd8
ffff88001fdea040 0000000000014c00 0000000000000001 ffff88001fdea040
Call Trace:
[<ffffffff8146155d>] io_schedule+0x4d/0x70
[<ffffffff810d2be5>] sync_page+0x65/0xa0
[<ffffffff81461b12>] __wait_on_bit_lock+0x52/0xb0
[<ffffffff810d2b80>] ? sync_page+0x0/0xa0
[<ffffffff810d2b64>] __lock_page+0x64/0x70
[<ffffffff81070ce0>] ? wake_bit_function+0x0/0x40
[<ffffffff810df1d4>] truncate_inode_pages_range+0x344/0x4a0
[<ffffffff810df340>] truncate_inode_pages+0x10/0x20
[<ffffffff8112cbfe>] generic_delete_inode+0x15e/0x190
[<ffffffff8112cc8d>] generic_drop_inode+0x5d/0x80
[<ffffffff8112bb88>] iput+0x78/0x80
[<ffffffff811bc908>] nfs_dentry_iput+0x38/0x50
[<ffffffff811285f4>] dentry_iput+0x84/0x110
[<ffffffff811286ae>] d_kill+0x2e/0x60
[<ffffffff8112912a>] dput+0x7a/0x170
[<ffffffff8111e925>] path_put+0x15/0x40
[<ffffffff811c3a44>] __put_nfs_open_context+0xa4/0xb0
[<ffffffff811cb5d0>] ? nfs_free_request+0x0/0x50
[<ffffffff811c3b0b>] put_nfs_open_context+0xb/0x10
[<ffffffff811cb5f9>] nfs_free_request+0x29/0x50
[<ffffffff81234b7e>] kref_put+0x8e/0xe0
[<ffffffff811cb594>] nfs_release_request+0x14/0x20
[<ffffffff811cf769>] nfs_find_and_lock_request+0x89/0xa0
[<ffffffff811d1180>] nfs_wb_page+0x80/0x110
[<ffffffff811c0770>] nfs_release_page+0x70/0x90
[<ffffffff810d18ee>] try_to_release_page+0x5e/0x80
[<ffffffff810e1178>] shrink_page_list+0x638/0x860
[<ffffffff810e19de>] shrink_zone+0x63e/0xc40
We can fix this by making the call to put_nfs_open_context() happen when we
actually remove the write request from the inode (which is done by the
nfsiod thread in this case).
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
2010-03-11 09:19:35 -05:00
..
2010-03-05 15:04:42 -06:00
2010-03-05 13:25:52 -05:00
2010-03-05 13:25:52 -05:00
2010-03-05 13:25:10 -05:00
2009-09-21 15:14:58 +02:00
2010-03-03 14:07:54 -05:00
2010-02-07 03:06:21 -05:00
2010-03-05 13:25:52 -05:00
2010-03-05 13:25:52 -05:00
2010-02-20 10:06:35 -05:00
2010-03-04 08:15:33 -08:00
2009-11-18 08:37:40 -08:00
2010-01-14 09:05:42 -05:00
2010-02-08 14:38:36 -05:00
2009-12-11 15:18:05 -08:00
2010-02-26 12:15:54 -06:00
2010-01-19 22:36:06 -06:00
2009-06-17 00:36:36 -04:00
2010-03-05 13:25:52 -05:00
2009-10-27 19:34:04 -04:00
2010-03-05 13:20:53 -08:00
2010-03-05 13:20:53 -08:00
2010-03-05 13:20:53 -08:00
2010-03-05 13:25:52 -05:00
2009-07-12 12:22:34 -07:00
2009-12-16 07:20:13 -08:00
2010-03-03 08:08:21 -08:00
2010-03-05 13:20:53 -08:00
2010-03-05 13:25:52 -05:00
2010-03-05 13:25:52 -05:00
2009-06-30 18:56:03 -07:00
2010-03-03 14:07:58 -05:00
2010-03-03 14:08:00 -05:00
2009-12-16 12:16:47 -05:00
2009-12-16 10:43:34 -08:00
2010-03-05 00:20:26 +01:00
2010-02-24 12:11:20 -05:00
2009-12-16 12:04:02 -08:00
2010-03-05 13:20:53 -08:00
2010-02-08 16:20:35 -05:00
2010-03-06 13:18:03 -08:00
2010-03-05 13:25:52 -05:00
2009-12-04 15:39:55 +01:00
2010-03-11 09:19:35 -05:00
2010-03-06 11:31:38 -08:00
2010-03-04 08:15:33 -08:00
2009-09-30 09:31:14 -07:00
2010-02-19 03:35:12 -05:00
2010-03-05 13:25:52 -05:00
2010-03-06 11:26:23 -08:00
2010-03-05 13:25:52 -05:00
2010-01-11 14:30:09 +01:00
2010-03-06 11:26:45 -08:00
2009-12-16 07:20:18 -08:00
2010-03-05 00:20:31 +01:00
2010-01-16 12:15:40 -08:00
2010-03-05 13:20:53 -08:00
2010-01-26 22:22:26 -05:00
2009-09-24 07:47:42 -04:00
2010-03-05 15:35:35 +00:00
2010-02-16 15:42:42 -08:00
2010-03-05 13:25:52 -05:00
2010-03-07 09:54:44 -08:00
2010-03-05 13:20:53 -08:00
2010-03-05 13:20:53 -08:00
2010-03-06 11:32:21 -08:00
2009-12-16 07:20:13 -08:00
2009-12-22 12:27:34 -05:00
2010-03-06 11:26:29 -08:00
2010-03-06 11:26:45 -08:00
2010-03-06 11:26:46 -08:00
2010-03-06 11:26:46 -08:00
2010-03-06 11:26:29 -08:00
2010-01-29 08:22:01 -08:00
2010-01-30 20:28:19 +01:00
2010-03-02 19:17:34 +01:00
2010-02-07 03:06:21 -05:00
2009-09-25 09:27:30 -07:00
2009-09-24 07:21:03 -07:00
2010-03-06 11:26:45 -08:00
2010-03-06 11:26:35 -08:00
2009-12-14 18:12:10 -05:00
2010-03-03 14:13:08 -05:00
2009-12-17 04:52:13 -05:00
2009-09-24 07:21:04 -07:00
2010-01-25 12:26:38 -02:00
2009-12-22 12:27:34 -05:00
2010-03-06 11:26:46 -08:00
2010-03-06 11:26:29 -08:00
2010-03-06 11:26:25 -08:00
2010-03-06 11:26:29 -08:00
2010-03-05 13:25:52 -05:00
2009-12-16 12:16:49 -05:00
2010-03-05 00:20:30 +01:00
2010-03-03 14:07:59 -05:00
2009-11-12 07:26:01 -08:00
2009-12-17 13:23:24 -08:00
2010-03-03 13:00:17 -05:00
2010-03-03 13:00:21 -05:00
2009-11-20 20:13:39 +01:00
2010-03-06 10:54:48 -08:00
2010-03-03 14:08:00 -05:00
2010-03-03 13:00:21 -05:00
2010-03-05 13:20:53 -08:00
2009-12-17 10:51:40 -05:00
2010-03-03 13:00:22 -05:00
2010-03-03 14:07:55 -05:00
2009-11-04 09:09:52 +01:00
2010-03-06 11:26:29 -08:00
2010-03-07 15:48:26 -08:00
2009-12-22 12:27:34 -05:00
2009-11-04 09:09:52 +01:00
2009-12-17 10:58:17 -05:00
2009-12-23 13:33:54 +01:00
2010-03-03 14:08:00 -05:00
2010-03-05 00:20:24 +01:00
2009-12-22 12:27:34 -05:00
2009-12-03 11:48:07 +00:00
2009-12-16 12:16:49 -05:00