From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] ocfs2: Set journal descriptor to NULL after journal shutdown
Date: Wed, 22 Oct 2008 14:05:40 -0700 [thread overview]
Message-ID: <20081022210540.GB9469@mail.oracle.com> (raw)
In-Reply-To: <1224707069-14173-1-git-send-email-sunil.mushran@oracle.com>
On Wed, Oct 22, 2008 at 01:24:29PM -0700, Sunil Mushran wrote:
> 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>
> ---
> fs/ocfs2/inode.c | 6 ++++++
> fs/ocfs2/journal.c | 1 +
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
> index 4903688..7aa00d5 100644
> --- a/fs/ocfs2/inode.c
> +++ b/fs/ocfs2/inode.c
> @@ -1106,6 +1106,12 @@ void ocfs2_clear_inode(struct inode *inode)
> oi->ip_last_trans = 0;
> oi->ip_dir_start_lookup = 0;
> oi->ip_blkno = 0ULL;
> +
> + /*
> + * ip_jinode is used to track txns against this inode. We ensure that
> + * the journal is flushed before journal shutdown. Thus it is safe to
> + * have inodes get cleaned up after journal shutdown.
> + */
> jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal,
> &oi->ip_jinode);
>
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index 81e4067..99fe9d5 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -690,6 +690,7 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb)
>
> /* Shutdown the kernel journal system */
> jbd2_journal_destroy(journal->j_journal);
> + journal->j_journal = NULL;
>
> OCFS2_I(inode)->ip_open_count--;
>
> --
> 1.5.4.3
>
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
--
"If at first you don't succeed, cover all traces that you tried."
-Unknown
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2008-10-22 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 20:24 [Ocfs2-devel] [PATCH 1/1] ocfs2: Set journal descriptor to NULL after journal shutdown Sunil Mushran
2008-10-22 21:05 ` Joel Becker [this message]
2008-10-24 22:47 ` Joel Becker
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=20081022210540.GB9469@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.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.