summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-11-13 11:55:17 +0100
committerTejun Heo <tj@kernel.org>2010-11-13 11:55:17 +0100
commit37004c42f7240035bc2726c340c4efa726b4818e (patch)
treef0c9c9b2d21a1258939b99ec37a2d11396583ea6 /fs/btrfs
parent731edacb7567c15f25b1fccac18a203bd432ae5e (diff)
downloadop-kernel-dev-37004c42f7240035bc2726c340c4efa726b4818e.zip
op-kernel-dev-37004c42f7240035bc2726c340c4efa726b4818e.tar.gz
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index cc04dc1..d395962 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;
}
OpenPOWER on IntegriCloud