From: Tejun Heo Date: Sat, 13 Nov 2010 10:55:17 +0000 (+0100) Subject: btrfs: close_bdev_exclusive() should use the same @flags as the matching open_bdev_ex... X-Git-Tag: v2.6.38-rc1~231^2~20^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=37004c42f7240035bc2726c340c4efa726b4818e;p=karo-tx-linux.git 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 Cc: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index cc04dc1445d6..d39596224d21 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -638,7 +638,7 @@ static int __btrfs_open_devices(struct btrfs_fs_devices *fs_devices, error_brelse: brelse(bh); error_close: - close_bdev_exclusive(bdev, FMODE_READ); + close_bdev_exclusive(bdev, flags); error: continue; }