public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Unlock inode before calling xfs_idestroy()
@ 2008-09-19  3:15 Lachlan McIlroy
  2008-09-19  4:12 ` Timothy Shimmin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lachlan McIlroy @ 2008-09-19  3:15 UTC (permalink / raw)
  To: xfs-oss, xfs-dev

Lock debugging reported the ilock was being destroyed
without being unlocked.

--- a/fs/xfs/xfs_iget.c	2008-09-19 13:03:57.000000000 +1000
+++ b/fs/xfs/xfs_iget.c	2008-09-19 13:12:38.000000000 +1000
@@ -214,6 +214,7 @@ finish_inode:
 		xfs_ilock(ip, lock_flags);
 
 	if ((ip->i_d.di_mode == 0) && !(flags & XFS_IGET_CREATE)) {
+		xfs_iunlock(ip, lock_flags);
 		xfs_idestroy(ip);
 		xfs_put_perag(mp, pag);
 		return ENOENT;
@@ -224,6 +225,7 @@ finish_inode:
 	 * write spinlock.
 	 */
 	if (radix_tree_preload(GFP_KERNEL)) {
+		xfs_iunlock(ip, lock_flags);
 		xfs_idestroy(ip);
 		delay(1);
 		goto again;
@@ -239,6 +241,7 @@ finish_inode:
 		BUG_ON(error != -EEXIST);
 		write_unlock(&pag->pag_ici_lock);
 		radix_tree_preload_end();
+		xfs_iunlock(ip, lock_flags);
 		xfs_idestroy(ip);
 		XFS_STATS_INC(xs_ig_dup);
 		goto again;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-09-22  3:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19  3:15 [PATCH] Unlock inode before calling xfs_idestroy() Lachlan McIlroy
2008-09-19  4:12 ` Timothy Shimmin
2008-09-22  3:52   ` Lachlan McIlroy
2008-09-19  7:26 ` Christoph Hellwig
2008-09-22  3:57   ` Lachlan McIlroy
2008-09-20  7:01 ` Dave Chinner
2008-09-22  3:59   ` Lachlan McIlroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox