From: Curt Wohlgemuth <curtw@google.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 1/2] ext4: clean up ext4_dirty_inode()
Date: Wed, 23 Sep 2009 07:37:06 -0700 [thread overview]
Message-ID: <6601abe90909230737s181769b1j968c92984344a40@mail.gmail.com> (raw)
In-Reply-To: <6601abe90909171455q50ab5c6dr5b125278d0eae845@mail.gmail.com>
Ted, any comment on this patch?
Thanks,
Curt
On Thu, Sep 17, 2009 at 2:55 PM, Curt Wohlgemuth <curtw@google.com> wrote:
> This patch cleans up ext4_dirty_inode(); it's attempt to detect non-matching
> transactions can never be executed.
>
> Signed-off-by: Curt Wohlgemuth <curtw@google.com>
> ---
>
> If 'current_handle' is non-NULL, then ext4_start_journal() will return the
> same handle with it's h_ref count incremented, and the h_transaction
> pointers will be the same.
>
> diff -uprN orig/fs/ext4/inode.c new/fs/ext4/inode.c
> --- orig/fs/ext4/inode.c 2009-09-17 13:59:48.000000000 -0700
> +++ new/fs/ext4/inode.c 2009-09-17 14:14:43.000000000 -0700
> @@ -5379,24 +5379,13 @@ void ext4_dirty_inode(struct inode *inod
> handle_t *current_handle = ext4_journal_current_handle();
> handle_t *handle;
>
> - if (!ext4_handle_valid(current_handle)) {
> - ext4_mark_inode_dirty(current_handle, inode);
> - return;
> - }
> -
> handle = ext4_journal_start(inode, 2);
> if (IS_ERR(handle))
> goto out;
> - if (current_handle &&
> - current_handle->h_transaction != handle->h_transaction) {
> - /* This task has a transaction open against a different fs */
> - printk(KERN_EMERG "%s: transactions do not match!\n",
> - __func__);
> - } else {
> - jbd_debug(5, "marking dirty. outer handle=%p\n",
> - current_handle);
> - ext4_mark_inode_dirty(handle, inode);
> - }
> +
> + jbd_debug(5, "marking dirty. outer handle=%p\n", current_handle);
> + ext4_mark_inode_dirty(handle, inode);
> +
> ext4_journal_stop(handle);
> out:
> return;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-09-23 14:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 21:55 [PATCH 1/2] ext4: clean up ext4_dirty_inode() Curt Wohlgemuth
2009-09-23 14:37 ` Curt Wohlgemuth [this message]
2009-09-23 15:32 ` Theodore Tso
2009-10-01 5:22 ` Theodore Tso
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=6601abe90909230737s181769b1j968c92984344a40@mail.gmail.com \
--to=curtw@google.com \
--cc=linux-ext4@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).