[PATCH] Check if AIL has been started before stopping it

Lachlan McIlroy lachlan at sgi.com
Mon Feb 9 19:27:06 CST 2009


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);
+	}
  }

  /*




More information about the xfs mailing list