From 9c89d62948c4740e379a7e0085dd8d7c1561f53f Mon Sep 17 00:00:00 2001 From: Milosz Tanski Date: Mon, 9 Sep 2013 14:28:57 -0400 Subject: fscache: check consistency does not decrement refcount __fscache_check_consistency() does not decrement the count of operations active after it finishes in the success case. This leads to a hung tasks on cookie de-registration (commonly in inode eviction). INFO: task kworker/1:2:4214 blocked for more than 120 seconds. kworker/1:2 D ffff880443513fc0 0 4214 2 0x00000000 Workqueue: ceph-msgr con_work [libceph] ... Call Trace: [] ? _raw_spin_unlock_irqrestore+0x16/0x20 [] ? fscache_wait_bit_interruptible+0x30/0x30 [fscache] [] schedule+0x29/0x70 [] fscache_wait_atomic_t+0xe/0x20 [fscache] [] out_of_line_wait_on_atomic_t+0x9f/0xe0 [] ? autoremove_wake_function+0x40/0x40 [] __fscache_relinquish_cookie+0x15c/0x310 [fscache] [] ceph_fscache_unregister_inode_cookie+0x3e/0x50 [ceph] [] ceph_destroy_inode+0x33/0x200 [ceph] [] ? __fsnotify_inode_delete+0xe/0x10 [] destroy_inode+0x3c/0x70 [] evict+0x119/0x1b0 Signed-off-by: Milosz Tanski Acked-by: David Howells Signed-off-by: Sage Weil --- fs/fscache/cookie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/fscache/cookie.c') diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index 318e8433527c..b2a86e324aac 100644 --- a/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c @@ -586,7 +586,8 @@ int __fscache_check_consistency(struct fscache_cookie *cookie) fscache_operation_init(op, NULL, NULL); op->flags = FSCACHE_OP_MYTHREAD | - (1 << FSCACHE_OP_WAITING); + (1 << FSCACHE_OP_WAITING) | + (1 << FSCACHE_OP_UNUSE_COOKIE); spin_lock(&cookie->lock); -- cgit v1.2.3