From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [PATCH 1/6] move root inode IRELE into xfs_unmountfs
Date: Sat, 26 Jul 2008 11:57:01 +0200 [thread overview]
Message-ID: <20080726095701.GA31858@lst.de> (raw)
The root inode is allocated in xfs_mountfs so it should be release in
xfs_unmountfs. For the unmount case that means we do it after the
the xfs_sync(mp, SYNC_WAIT | SYNC_CLOSE) in the forced shutdown case
and the dmapi unmount event. Note that both reference the rip variable
which might be freed by that time in case inode flushing has kicked in,
so strictly speaking this might count as a bug fix
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2008-07-26 09:08:06.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2008-07-26 09:21:25.000000000 +0200
@@ -1182,8 +1182,6 @@ xfs_fs_put_super(
error = xfs_unmount_flush(mp, 0);
WARN_ON(error);
- IRELE(rip);
-
/*
* If we're forcing a shutdown, typically because of a media error,
* we want to make sure we invalidate dirty pages that belong to
@@ -1683,8 +1681,6 @@ xfs_fs_fill_super(
error = xfs_unmount_flush(mp, 0);
WARN_ON(error);
- IRELE(mp->m_rootip);
-
xfs_unmountfs(mp);
goto out_free_fsname;
}
Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2008-07-26 09:02:18.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2008-07-26 09:27:36.000000000 +0200
@@ -1250,6 +1250,8 @@ xfs_unmountfs(xfs_mount_t *mp)
__uint64_t resblks;
int error = 0;
+ IRELE(mp->m_rootip);
+
/*
* We can potentially deadlock here if we have an inode cluster
* that has been freed has it's buffer still pinned in memory because
reply other threads:[~2008-07-26 9:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080726095701.GA31858@lst.de \
--to=hch@lst.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox