Merge branch 'btrfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'btrfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: btrfs: take allocation of ->tree_root into open_ctree() btrfs: let ->s_fs_info point to fs_info, not root... btrfs: consolidate failure exits in btrfs_mount() a bit btrfs: make free_fs_info() call ->kill_sb() unconditional btrfs: merge free_fs_info() calls on fill_super failures btrfs: kill pointless reassignment of ->s_fs_info in btrfs_fill_super() btrfs: make open_ctree() return int btrfs: sanitizing ->fs_info, part 5 btrfs: sanitizing ->fs_info, part 4 btrfs: sanitizing ->fs_info, part 3 btrfs: sanitizing ->fs_info, part 2 btrfs: sanitizing ->fs_info, part 1 btrfs: fix a deadlock in btrfs_scan_one_device() btrfs: fix mount/umount race btrfs: get ->kill_sb() of its own btrfs: preparation to fixing mount/umount race
This commit is contained in:
@@ -708,8 +708,6 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
|
||||
u64 devid;
|
||||
u64 transid;
|
||||
|
||||
mutex_lock(&uuid_mutex);
|
||||
|
||||
flags |= FMODE_EXCL;
|
||||
bdev = blkdev_get_by_path(path, flags, holder);
|
||||
|
||||
@@ -718,6 +716,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
|
||||
goto error;
|
||||
}
|
||||
|
||||
mutex_lock(&uuid_mutex);
|
||||
ret = set_blocksize(bdev, 4096);
|
||||
if (ret)
|
||||
goto error_close;
|
||||
@@ -739,9 +738,9 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
|
||||
|
||||
brelse(bh);
|
||||
error_close:
|
||||
mutex_unlock(&uuid_mutex);
|
||||
blkdev_put(bdev, flags);
|
||||
error:
|
||||
mutex_unlock(&uuid_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user