]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: sysfs: normalize the error handling branch in btrfs_init_sysfs()
authorZhen Lei <thunder.leizhen@huawei.com>
Tue, 22 Nov 2022 11:50:02 +0000 (19:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:01 +0000 (11:23 +0100)
commitd498382e695c9e8afb263b368202f2e187a9bed0
tree10544ca434d653d3e4ba0deb04a694d377f82517
parent5df04a9a1e89277bf374a7820879fc304204d775
btrfs: sysfs: normalize the error handling branch in btrfs_init_sysfs()

commit 09b2c76b090b5b0af8420b1ce068779556b0c452 upstream.

Although kset_unregister() can eventually remove all attribute files,
explicitly rolling back with the matching function makes the code logic
look clearer.

CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/sysfs.c