Skip to content

Commit

Permalink
btrfs: close_bdev_exclusive() should use the same @flags as the match…
Browse files Browse the repository at this point in the history
…ing 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>
  • Loading branch information
Tejun Heo committed Nov 13, 2010
1 parent 731edac commit 37004c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 37004c4

Please sign in to comment.