btrfs: close_bdev_exclusive() should use the same @flags as the matching open_bdev_exclusive()
In the failure path of __btrfs_open_devices(), close_bdev_exclusive() is called with @flags which doesn't match the one used during open_bdev_exclusive(). Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
731edacb75
commit
37004c42f7
1 changed files with 1 additions and 1 deletions
|
@ -638,7 +638,7 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
|
||||||
error_brelse:
|
error_brelse:
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
error_close:
|
error_close:
|
||||||
close_bdev_exclusive(bdev, FMODE_READ);
|
close_bdev_exclusive(bdev, flags);
|
||||||
error:
|
error:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue