From: Anand Jain Date: Mon, 9 Mar 2015 22:38:19 +0000 (+0800) Subject: Btrfs: sysfs: fix, btrfs_release_super_kobj() should to clean up the kobject data X-Git-Tag: omap-for-v4.3/legacy-v2-signed~98^2~1^2~25 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=248d200df34f3e44a4140f32dfc7428c52615332;p=pandora-kernel.git Btrfs: sysfs: fix, btrfs_release_super_kobj() should to clean up the kobject data The following test case fails indicating that, thread tried to init an initialized object. kernel: [232104.016513] kobject (ffff880006c1c980): tried to init an initialized object, something is seriously wrong. btrfs_sysfs_remove_one() self test code: open_tree() { :: ret = btrfs_sysfs_add_one(fs_info); if (ret) { pr_err("BTRFS: failed to init sysfs interface: %d\n", ret); goto fail_block_groups; } + btrfs_sysfs_remove_one(fs_info); + ret = btrfs_sysfs_add_one(fs_info); + if (ret) { + pr_err("BTRFS: failed to init sysfs interface: %d\n", ret); + goto fail_block_groups; + } cleaning up the unregistered kobject fixes this. Signed-off-by: Anand Jain Signed-off-by: David Sterba --- Reading git-diff-tree failed