summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
authorAnand Jain <Anand.Jain@oracle.com>2014-01-13 21:14:55 +0800
committerChris Mason <clm@fb.com>2014-01-31 08:22:26 -0800
commitf920dbce8d8161fff30e3e75ebfc71e978d9bea4 (patch)
tree2ca6561e3cd88062c327281d83c758f588055e60 /volumes.c
parentb2e99e1819d967828edf149db5a203e59a40e379 (diff)
btrfs-progs: btrfsck operations should be exclusive
this patch will make btrfsck operations to open disk in exclusive mode, so that mount will fail when btrfsck is running Signed-off-by: Anand Jain <Anand.Jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/volumes.c b/volumes.c
index 65be5f07..8c458517 100644
--- a/volumes.c
+++ b/volumes.c
@@ -214,7 +214,7 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, int flags)
if (device->devid == fs_devices->lowest_devid)
fs_devices->lowest_bdev = fd;
device->fd = fd;
- if (flags == O_RDWR)
+ if (flags & O_RDWR)
device->writeable = 1;
}
return 0;