[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a840f129-9626-9b96-be2c-173b3e9371fe@gmx.com>
Date: Wed, 26 Dec 2018 13:51:16 +0800
From: Su Yue <Damenly_Su@....com>
To: Kangjie Lu <kjlu@....edu>
Cc: pakki001@....edu, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] btrfs: add a check for sysfs_create_group
On 12/26/18 1:37 PM, Kangjie Lu wrote:
> In case sysfs_create_group fails, let's check its return value and
> issues an error message.
>
> Signed-off-by: Kangjie Lu <kjlu@....edu>
> ---
> fs/btrfs/sysfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index 3717c864ba23..24ef416e700b 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -889,6 +889,8 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
> */
> sysfs_remove_group(fsid_kobj, &btrfs_feature_attr_group);
> ret = sysfs_create_group(fsid_kobj, &btrfs_feature_attr_group);
> + if (ret)
> + btrfs_err(fs_info, "failed to create btrfs_feature_attr_group.\n");
NIT: ".\n" is unnecessary.
---
Su
> }
>
> static int btrfs_init_debugfs(void)
>
Powered by blists - more mailing lists