xfs
[Top] [All Lists]

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

To: xfs@xxxxxxxxxxx
Subject: [PATCH] Check if AIL has been started before stopping it
From: Lachlan McIlroy <lachlan@xxxxxxx>
Date: Tue, 10 Feb 2009 12:27:06 +1100
Organization: SGI
Reply-to: lachlan@xxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20081209)
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);
+       }
 }

 /*

<Prev in Thread] Current Thread [Next in Thread>