From: Nikolay Borisov <nborisov@suse.com>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: Chris Mason <clm@fb.com>, David Sterba <dsterba@suse.com>,
Josef Bacik <josef@toxicpanda.com>,
emamd001@umn.edu, kjlu@umn.edu, smccaman@umn.edu,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: prevent memory leak in super.c
Date: Tue, 24 Sep 2019 10:43:16 +0300 [thread overview]
Message-ID: <210dd390-386e-27e0-b3a5-86f4a28da80a@suse.com> (raw)
In-Reply-To: <20190923225713.13381-1-navid.emamdoost@gmail.com>
On 24.09.19 г. 1:57 ч., Navid Emamdoost wrote:
> In btrfs_mount_root the last error checking was not going to the error
> handling path. Fixed it.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
NAK
deactivate_locked_super actually calls btrfs_kill_super which in turn
calls generic_shutdown_super which does the required shutdown sequence.
> ---
> fs/btrfs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 1b151af25772..9f3f62c000fa 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -1565,7 +1565,7 @@ static struct dentry *btrfs_mount_root(struct file_system_type *fs_type,
> security_free_mnt_opts(&new_sec_opts);
> if (error) {
> deactivate_locked_super(s);
> - return ERR_PTR(error);
> + goto error_close_devices;
> }
>
> return dget(s->s_root);
>
prev parent reply other threads:[~2019-09-24 7:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 22:57 Navid Emamdoost
2019-09-24 7:43 ` Nikolay Borisov [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=210dd390-386e-27e0-b3a5-86f4a28da80a@suse.com \
--to=nborisov@suse.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=emamd001@umn.edu \
--cc=josef@toxicpanda.com \
--cc=kjlu@umn.edu \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=navid.emamdoost@gmail.com \
--cc=smccaman@umn.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
all inboxes | Powered by JetHome®