From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, djwong@us.ibm.com
Subject: Re: [PATCH] PING ext4: fix double unlock buffer mess during fs-resize
Date: Tue, 25 Sep 2012 19:25:18 +0400 [thread overview]
Message-ID: <87d31aw2e9.fsf@openvz.org> (raw)
In-Reply-To: <1347012884-29484-1-git-send-email-dmonakhov@openvz.org>
On Fri, 7 Sep 2012 14:14:44 +0400, Dmitry Monakhov <dmonakhov@openvz.org> wrote:
> bh_submit_read() is responsible for unlock bh on endio
>
Hi, are any objections against this fix?
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> ---
> fs/ext4/resize.c | 15 +++++----------
> 1 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
> index 41f6ef6..3b05198 100644
> --- a/fs/ext4/resize.c
> +++ b/fs/ext4/resize.c
> @@ -1076,17 +1076,12 @@ static struct buffer_head *ext4_get_bitmap(struct super_block *sb, __u64 block)
> struct buffer_head *bh = sb_getblk(sb, block);
> if (!bh)
> return NULL;
> -
> - if (bitmap_uptodate(bh))
> - return bh;
> -
> - lock_buffer(bh);
> - if (bh_submit_read(bh) < 0) {
> - unlock_buffer(bh);
> - brelse(bh);
> - return NULL;
> + if (!bh_uptodate_or_lock(bh)) {
> + if (bh_submit_read(bh) < 0) {
> + brelse(bh);
> + return NULL;
> + }
> }
> - unlock_buffer(bh);
>
> return bh;
> }
> --
> 1.7.7.6
>
> --
> 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:[~2012-09-25 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 10:14 [PATCH] ext4: fix double unlock buffer mess during fs-resize Dmitry Monakhov
2012-09-25 15:25 ` Dmitry Monakhov [this message]
2012-09-26 3:26 ` Theodore Ts'o
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=87d31aw2e9.fsf@openvz.org \
--to=dmonakhov@openvz.org \
--cc=djwong@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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).