From: Josef Bacik <jbacik@fb.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/4] Btrfs: just free dummy extent buffers
Date: Wed, 18 Mar 2015 09:57:27 -0400 [thread overview]
Message-ID: <55098447.3030300@fb.com> (raw)
In-Reply-To: <20150318135600.GB20767@twin.jikos.cz>
On 03/18/2015 09:56 AM, David Sterba wrote:
> On Tue, Mar 17, 2015 at 04:38:01PM -0400, Josef Bacik wrote:
>> If we fail during our sanity tests we could get NULL deref's because we unload
>> the module before the dummy extent buffers are free'd via RCU. So check for
>> this case and just free the things directly. Thanks,
>>
>> Signed-off-by: Josef Bacik <jbacik@fb.com>
>> ---
>> fs/btrfs/extent_io.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
>> index 29850d4..d13cead 100644
>> --- a/fs/btrfs/extent_io.c
>> +++ b/fs/btrfs/extent_io.c
>> @@ -4968,6 +4968,12 @@ static int release_extent_buffer(struct extent_buffer *eb)
>>
>> /* Should be safe to release our pages at this point */
>> btrfs_release_extent_buffer_page(eb);
>> +#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
>
> Please use btrfs_test_is_dummy_root, it's there to avoid the #ifdefs
Don't have a root here. Thanks,
Josef
next prev parent reply other threads:[~2015-03-18 13:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 20:37 [PATCH 0/4] Accounting fixes Josef Bacik
2015-03-17 20:38 ` [PATCH 1/4] Btrfs: account merges/splits properly Josef Bacik
2015-03-18 11:53 ` Filipe David Manana
2015-03-17 20:38 ` [PATCH 2/4] Btrfs: just free dummy extent buffers Josef Bacik
2015-03-18 13:56 ` David Sterba
2015-03-18 13:57 ` Josef Bacik [this message]
2015-03-17 20:38 ` [PATCH 3/4] Btrfs: add sanity test for outstanding_extents accounting Josef Bacik
2015-03-17 20:38 ` [PATCH 4/4] Btrfs: fix outstanding_extents accounting in DIO Josef Bacik
2015-03-18 11:55 ` Filipe David Manana
2015-03-18 18:59 ` [PATCH 0/4] Accounting fixes Holger Hoffstätte
2015-03-19 12:47 ` David Sterba
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=55098447.3030300@fb.com \
--to=jbacik@fb.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@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).