diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2008-10-22 16:24:29 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-11-10 12:51:47 -0500 |
commit | ae0dff683076b2798763288c7ac2f09a18c4a998 (patch) | |
tree | 191b95751d25a6480619dc2cbbe340da4adddfcc /fs/ocfs2/inode.c | |
parent | d32647993c211901fc4819ef3327f62d1859241b (diff) |
ocfs2: Set journal descriptor to NULL after journal shutdown
Patch sets journal descriptor to NULL after the journal is shutdown.
This ensures that jbd2_journal_release_jbd_inode(), which removes the
jbd2 inode from txn lists, can be called safely from ocfs2_clear_inode()
even after the journal has been shutdown.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/inode.c')
-rw-r--r-- | fs/ocfs2/inode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 4903688f72a9..7aa00d511874 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -1106,6 +1106,12 @@ void ocfs2_clear_inode(struct inode *inode) | |||
1106 | oi->ip_last_trans = 0; | 1106 | oi->ip_last_trans = 0; |
1107 | oi->ip_dir_start_lookup = 0; | 1107 | oi->ip_dir_start_lookup = 0; |
1108 | oi->ip_blkno = 0ULL; | 1108 | oi->ip_blkno = 0ULL; |
1109 | |||
1110 | /* | ||
1111 | * ip_jinode is used to track txns against this inode. We ensure that | ||
1112 | * the journal is flushed before journal shutdown. Thus it is safe to | ||
1113 | * have inodes get cleaned up after journal shutdown. | ||
1114 | */ | ||
1109 | jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal, | 1115 | jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal, |
1110 | &oi->ip_jinode); | 1116 | &oi->ip_jinode); |
1111 | 1117 | ||