public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Check if AIL has been started before stopping it
@ 2009-02-10  1:27 Lachlan McIlroy
  2009-02-10 10:12 ` Christoph Hellwig
  2009-02-10 10:12 ` Dave Chinner
  0 siblings, 2 replies; 3+ messages in thread
From: Lachlan McIlroy @ 2009-02-10  1:27 UTC (permalink / raw)
  To: xfs

A failure during mount can result in shutting down the AIL when
it may not have been started up yet.

Index: xfs-patch/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- xfs-patch.orig/fs/xfs/linux-2.6/xfs_super.c
+++ xfs-patch/fs/xfs/linux-2.6/xfs_super.c
@@ -913,7 +913,8 @@ void
  xfsaild_stop(
  	struct xfs_ail	*ailp)
  {
-	kthread_stop(ailp->xa_task);
+	if (ailp->xa_task)
+		kthread_stop(ailp->xa_task);
  }


Index: xfs-patch/fs/xfs/xfs_trans_ail.c
===================================================================
--- xfs-patch.orig/fs/xfs/xfs_trans_ail.c
+++ xfs-patch/fs/xfs/xfs_trans_ail.c
@@ -598,8 +598,10 @@ xfs_trans_ail_destroy(
  {
  	struct xfs_ail	*ailp = mp->m_ail;

-	xfsaild_stop(ailp);
-	kmem_free(ailp);
+	if (ailp) {
+		xfsaild_stop(ailp);
+		kmem_free(ailp);
+	}
  }

  /*

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2009-02-10 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-10  1:27 [PATCH] Check if AIL has been started before stopping it Lachlan McIlroy
2009-02-10 10:12 ` Christoph Hellwig
2009-02-10 10:12 ` Dave Chinner

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