cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] unlock page lock before doing a dq
@ 2007-09-08 14:25 Josef Bacik
  2007-09-08 15:04 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2007-09-08 14:25 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hello,

There is a lockup condition where we get an error while perparing to write (such
as ENOSPC) and we go to do the gfs2_glock_dq_m and the glock has been marked
dirty.  Since we are already holding the page lock, we will deadlock because we
will try to flush all the pages back to disk and try to take the pagelock again.
Wendy you said I would be doing this in a transaction, but if there as error
inside where we started the transaction, we goto out, where we stop the
transaction first and then go on and unlock the page.  This fixes RH bz 280791.
Thank you,

Josef

--- 18.34/fs/gfs2/ops_address.c.josef	2007-09-07 15:07:03.000000000 -0400
+++ 18.34/fs/gfs2/ops_address.c	2007-09-07 15:12:45.000000000 -0400
@@ -457,8 +457,10 @@ out_alloc_put:
 			gfs2_alloc_put(ip);
 		}
 out_unlock:
+		unlock_page(page);
 		gfs2_glock_dq_m(1, &ip->i_gh);
 		gfs2_holder_uninit(&ip->i_gh);
+		lock_page(page);
 	}
 
 	return error;



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

end of thread, other threads:[~2007-09-08 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-08 14:25 [Cluster-devel] [PATCH] unlock page lock before doing a dq Josef Bacik
2007-09-08 15:04 ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).