From: Anatol Pomozov <anatol.pomozov@gmail.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: wenqing.lz@taobao.com, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: Remove code duplication in ext4_get_block_write_nolock()
Date: Fri, 9 Nov 2012 09:51:35 -0800 [thread overview]
Message-ID: <CAOMFOmX8RfzxpwV2OhYQnMTezjwHQLGAV-za7wz3gRSNv88iFg@mail.gmail.com> (raw)
In-Reply-To: <20121109172957.GA19041@thunk.org>
Hi
On Fri, Nov 9, 2012 at 9:29 AM, Theodore Ts'o <tytso@mit.edu> wrote:
> There's a really serious bug in this patch which I didn't notice at
> first:
>
>> --- a/fs/ext4/inode.c
>> +++ b/fs/ext4/inode.c
>> @@ -683,7 +683,7 @@ static int _ext4_get_block(struct inode *inode, sector_t iblock,
>> map.m_lblk = iblock;
>> map.m_len = bh->b_size >> inode->i_blkbits;
>>
>> - if (flags && !handle) {
>> + if (flags && !(flags | EXT4_GET_BLOCKS_NO_LOCK) && !handle) {
> ^^^
>
> This should obviously read:
>
> if (flags && !(flags & EXT4_GET_BLOCKS_NO_LOCK) && !handle) {
D'oh... You are right..
> Otherwise xfstests #91 will blow out with a circular lockdep warning.
>
> As a reminder, please do make sure you compile with lockdep enabled
> when you run your tests; it's found more than one bug for me!
I though I tested with and without debug options enabled. Maybe I
missed lockdep option somehow, next time i'll make sure that it is
enabled.
Thanks for catching it.
>
> - Ted
next prev parent reply other threads:[~2012-11-09 17:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 19:06 [PATCH 1/2] Use 'inode' variable that is already dereferenced Anatol Pomozov
2012-10-15 19:06 ` [PATCH 2/2] ext4: Remove code duplication in ext4_get_block_write_nolock() Anatol Pomozov
2012-10-15 19:14 ` Anatol Pomozov
2012-10-16 2:37 ` Zheng Liu
2012-10-16 2:36 ` Zheng Liu
2012-11-08 20:08 ` Theodore Ts'o
2012-11-09 17:29 ` Theodore Ts'o
2012-11-09 17:51 ` Anatol Pomozov [this message]
2012-10-16 2:28 ` [PATCH 1/2] Use 'inode' variable that is already dereferenced Zheng Liu
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=CAOMFOmX8RfzxpwV2OhYQnMTezjwHQLGAV-za7wz3gRSNv88iFg@mail.gmail.com \
--to=anatol.pomozov@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wenqing.lz@taobao.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).