diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2011-10-12 17:20:43 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-10-20 12:20:36 -0400 |
commit | 5f524444c351e145a5f7e28253594688a421bfe8 (patch) | |
tree | 1a29d2ffe81648da1328a33c3669a2a7eeedba39 /fs/btrfs | |
parent | 068132bad1de70f85f5f6d12c36d64f8f7848d92 (diff) |
Btrfs: fix a bug when opening seed devices
Initialize fs_info->bdev_holder a bit earlier to be able to pass a
correct holder id to blkdev_get() when opening seed devices with O_EXCL.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 09ce951666ea..29eecbb6ec3a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -939,6 +939,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
939 | 939 | ||
940 | s->s_flags = flags | MS_NOSEC; | 940 | s->s_flags = flags | MS_NOSEC; |
941 | strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id)); | 941 | strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id)); |
942 | btrfs_sb(s)->fs_info->bdev_holder = fs_type; | ||
942 | error = btrfs_fill_super(s, fs_devices, data, | 943 | error = btrfs_fill_super(s, fs_devices, data, |
943 | flags & MS_SILENT ? 1 : 0); | 944 | flags & MS_SILENT ? 1 : 0); |
944 | if (error) { | 945 | if (error) { |
@@ -946,7 +947,6 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, | |||
946 | return ERR_PTR(error); | 947 | return ERR_PTR(error); |
947 | } | 948 | } |
948 | 949 | ||
949 | btrfs_sb(s)->fs_info->bdev_holder = fs_type; | ||
950 | s->s_flags |= MS_ACTIVE; | 950 | s->s_flags |= MS_ACTIVE; |
951 | } | 951 | } |
952 | 952 | ||