summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2011-02-15 19:12:57 +0100
committerChris Mason <chris.mason@oracle.com>2011-02-16 22:34:00 +0100
commitfb01aa85b8b29c1a4e1f4a28ea54175de6bf7559 (patch)
treeaf7fc0623980c03c3f808f9ec157341d8549133d /fs
parentBtrfs: make btrfs_rm_device() fail gracefully (diff)
downloadlinux-fb01aa85b8b29c1a4e1f4a28ea54175de6bf7559.tar.xz
linux-fb01aa85b8b29c1a4e1f4a28ea54175de6bf7559.zip
Btrfs: set FMODE_EXCL in btrfs_device->mode
This fixes a bug introduced in d4d77629, where the device added online (and therefore initialized via btrfs_init_new_device()) would be left with the positive bdev->bd_holders after unmount. Since d4d77629 we no longer OR FMODE_EXCL explicitly on blkdev_put(), set it in btrfs_device->mode. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-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 f31c33119bb6..94334d952280 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1639,7 +1639,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
device->dev_root = root->fs_info->dev_root;
device->bdev = bdev;
device->in_fs_metadata = 1;
- device->mode = 0;
+ device->mode = FMODE_EXCL;
set_blocksize(device->bdev, 4096);
if (seeding_dev) {