All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lachlan McIlroy <lachlan@sgi.com>
To: xfs@oss.sgi.com
Subject: [PATCH] Check if AIL has been started before stopping it
Date: Tue, 10 Feb 2009 12:27:06 +1100	[thread overview]
Message-ID: <4990D7EA.7020902@sgi.com> (raw)

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

             reply	other threads:[~2009-02-10  1:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10  1:27 Lachlan McIlroy [this message]
2009-02-10 10:12 ` [PATCH] Check if AIL has been started before stopping it Christoph Hellwig
2009-02-10 10:12 ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4990D7EA.7020902@sgi.com \
    --to=lachlan@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.