diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2011-10-13 00:20:43 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-10-20 18:20:36 +0200 |
commit | 5f524444c351e145a5f7e28253594688a421bfe8 (patch) | |
tree | 1a29d2ffe81648da1328a33c3669a2a7eeedba39 /fs/btrfs/super.c | |
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/super.c')
-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, s->s_flags = flags | MS_NOSEC; strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id)); + btrfs_sb(s)->fs_info->bdev_holder = fs_type; error = btrfs_fill_super(s, fs_devices, data, flags & MS_SILENT ? 1 : 0); if (error) { @@ -946,7 +947,6 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags, return ERR_PTR(error); } - btrfs_sb(s)->fs_info->bdev_holder = fs_type; s->s_flags |= MS_ACTIVE; } |