From: Anand Jain <anand.jain@oracle.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Chris Mason <clm@fb.com>, Dennis Zhou <dennis@kernel.org>
Cc: Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix error code in btrfs_sysfs_add_mounted()
Date: Fri, 10 Jan 2020 17:13:35 +0800 [thread overview]
Message-ID: <b5d47473-8dc1-6780-a774-95fa9a5bf8ee@oracle.com> (raw)
In-Reply-To: <20200110055126.4rhhfsotll6puma7@kili.mountain>
On 10/1/20 1:51 PM, Dan Carpenter wrote:
> The error code wasn't set on this error path.
>
> Fixes: e12ebce8a4a8 ("btrfs: sysfs: make UUID/debug have its own kobject")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> fs/btrfs/sysfs.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index 58486229be95..55e4ed1af29c 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -1288,8 +1288,10 @@ int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info)
>
> #ifdef CONFIG_BTRFS_DEBUG
> fs_info->debug_kobj = kobject_create_and_add("debug", fsid_kobj);
> - if (!fs_info->debug_kobj)
> + if (!fs_info->debug_kobj) {
> + error = -ENOMEM;
uh-oh right.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Thanks, Anand
> goto failure;
> + }
>
> error = sysfs_create_files(fs_info->debug_kobj, btrfs_debug_mount_attrs);
> if (error)
>
next prev parent reply other threads:[~2020-01-10 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 5:51 [PATCH] btrfs: Fix error code in btrfs_sysfs_add_mounted() Dan Carpenter
2020-01-10 9:13 ` Anand Jain [this message]
2020-01-10 17:06 ` 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=b5d47473-8dc1-6780-a774-95fa9a5bf8ee@oracle.com \
--to=anand.jain@oracle.com \
--cc=clm@fb.com \
--cc=dan.carpenter@oracle.com \
--cc=dennis@kernel.org \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=kernel-janitors@vger.kernel.org \
--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