From: Jan Kara <jack@suse.cz>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] jbd: Convert atomic_inc() to get_bh()
Date: Mon, 18 Oct 2010 12:54:38 +0200 [thread overview]
Message-ID: <20101018105438.GI3826@quack.suse.cz> (raw)
In-Reply-To: <1287216662-4267-1-git-send-email-namhyung@gmail.com>
On Sat 16-10-10 17:11:02, Namhyung Kim wrote:
> Convert atomic_inc(&bh->b_count) to get_bh(bh) for consistency.
Thanks. Merged.
Honza
>
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> ---
> fs/jbd/checkpoint.c | 4 ++--
> fs/jbd/commit.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
> index 05a38b9..e4b87bc 100644
> --- a/fs/jbd/checkpoint.c
> +++ b/fs/jbd/checkpoint.c
> @@ -221,7 +221,7 @@ restart:
> goto restart;
> }
> if (buffer_locked(bh)) {
> - atomic_inc(&bh->b_count);
> + get_bh(bh);
> spin_unlock(&journal->j_list_lock);
> jbd_unlock_bh_state(bh);
> wait_on_buffer(bh);
> @@ -283,7 +283,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
> int ret = 0;
>
> if (buffer_locked(bh)) {
> - atomic_inc(&bh->b_count);
> + get_bh(bh);
> spin_unlock(&journal->j_list_lock);
> jbd_unlock_bh_state(bh);
> wait_on_buffer(bh);
> diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
> index 95d8c11..1a9d033 100644
> --- a/fs/jbd/commit.c
> +++ b/fs/jbd/commit.c
> @@ -611,7 +611,7 @@ void journal_commit_transaction(journal_t *journal)
> /* Bump b_count to prevent truncate from stumbling over
> the shadowed buffer! @@@ This can go if we ever get
> rid of the BJ_IO/BJ_Shadow pairing of buffers. */
> - atomic_inc(&jh2bh(jh)->b_count);
> + get_bh(jh2bh(jh));
>
> /* Make a temporary IO buffer with which to write it out
> (this will requeue both the metadata buffer and the
> --
> 1.7.0.4
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2010-10-18 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-16 8:11 [PATCH] jbd: Convert atomic_inc() to get_bh() Namhyung Kim
2010-10-18 10:54 ` Jan Kara [this message]
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=20101018105438.GI3826@quack.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.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;
as well as URLs for NNTP newsgroup(s).