]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
Btrfc: sysfs: fix, check if device_dir_kobj is init before destroy
authorAnand Jain <Anand.Jain@oracle.com>
Mon, 9 Mar 2015 22:38:23 +0000 (06:38 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 27 May 2015 10:27:19 +0000 (12:27 +0200)
commit4d435731f99db87020730c4b17e1da148908340e
tree0999c9da1b0641d8a77e181508dc030bf20bf7dd
parent8345ea31dc6e1772726d1d0b8864dedac55038e0
Btrfc: sysfs: fix, check if device_dir_kobj is init before destroy

Since the failure code in the btrfs_sysfs_add_one() can
call btrfs_sysfs_remove_one() even before device_dir_kobj
has been created we need to check if its null.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/sysfs.c