]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/ocfs2-Set-journal-descriptor-to-NULL-after-journal.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / ocfs2-Set-journal-descriptor-to-NULL-after-journal.patch
CommitLineData
00e5a55c
BS
1From: Sunil Mushran <sunil.mushran@oracle.com>
2Date: Wed, 22 Oct 2008 13:24:29 -0700
3Subject: ocfs2: Set journal descriptor to NULL after journal shutdown
4References: BZ 450579
5Patch-mainline: 2.6.28
6
7Patch sets journal descriptor to NULL after the journal is shutdown.
8This ensures that jbd2_journal_release_jbd_inode(), which removes the
9jbd2 inode from txn lists, can be called safely from ocfs2_clear_inode()
10even after the journal has been shutdown.
11
12Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13Signed-off-by: Joel Becker <joel.becker@oracle.com>
14Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15---
16 fs/ocfs2/inode.c | 6 ++++++
17 fs/ocfs2/journal.c | 1 +
18 2 files changed, 7 insertions(+), 0 deletions(-)
19
20Index: linux-2.6.27-ocfs2/fs/ocfs2/inode.c
21===================================================================
22--- linux-2.6.27-ocfs2.orig/fs/ocfs2/inode.c
23+++ linux-2.6.27-ocfs2/fs/ocfs2/inode.c
24@@ -1106,6 +1106,12 @@ void ocfs2_clear_inode(struct inode *ino
25 oi->ip_last_trans = 0;
26 oi->ip_dir_start_lookup = 0;
27 oi->ip_blkno = 0ULL;
28+
29+ /*
30+ * ip_jinode is used to track txns against this inode. We ensure that
31+ * the journal is flushed before journal shutdown. Thus it is safe to
32+ * have inodes get cleaned up after journal shutdown.
33+ */
34 jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal,
35 &oi->ip_jinode);
36
37Index: linux-2.6.27-ocfs2/fs/ocfs2/journal.c
38===================================================================
39--- linux-2.6.27-ocfs2.orig/fs/ocfs2/journal.c
40+++ linux-2.6.27-ocfs2/fs/ocfs2/journal.c
41@@ -690,6 +690,7 @@ void ocfs2_journal_shutdown(struct ocfs2
42
43 /* Shutdown the kernel journal system */
44 jbd2_journal_destroy(journal->j_journal);
45+ journal->j_journal = NULL;
46
47 OCFS2_I(inode)->ip_open_count--;
48