summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/sysfs.c
diff options
context:
space:
mode:
authorAnand Jain <Anand.Jain@oracle.com>2015-03-09 23:38:31 +0100
committerDavid Sterba <dsterba@suse.cz>2015-05-27 12:27:21 +0200
commit5a13f4308c5b4af28c01ca9cacdd8a6db777dfcb (patch)
treebbcf968663f62132f90b25a5cb937950f47d7295 /fs/btrfs/sysfs.c
parentBtrfs: introduce btrfs_get_fs_uuids to get fs_uuids (diff)
downloadlinux-5a13f4308c5b4af28c01ca9cacdd8a6db777dfcb.tar.xz
linux-5a13f4308c5b4af28c01ca9cacdd8a6db777dfcb.zip
Btrfs: sysfs: add pointer to access fs_info from fs_devices
adds fs_info pointer with struct btrfs_fs_devices. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/sysfs.c')
-rw-r--r--fs/btrfs/sysfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index f045c568b360..4b9a8df3faea 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -530,6 +530,8 @@ static void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs)
void btrfs_sysfs_remove_one(struct btrfs_fs_info *fs_info)
{
+ btrfs_reset_fs_info_ptr(fs_info);
+
if (fs_info->space_info_kobj) {
sysfs_remove_files(fs_info->space_info_kobj, allocation_attrs);
kobject_del(fs_info->space_info_kobj);
@@ -729,6 +731,8 @@ int btrfs_sysfs_add_one(struct btrfs_fs_info *fs_info)
struct btrfs_fs_devices *fs_devs = fs_info->fs_devices;
struct kobject *super_kobj = &fs_devs->super_kobj;
+ btrfs_set_fs_info_ptr(fs_info);
+
error = btrfs_sysfs_add_fsid(fs_devs, NULL);
if (error)
return error;