projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfa7a9c
)
btrfs: get the device in write mode when deleting it
author
Lukas Czerner
<lczerner@redhat.com>
Fri, 7 Dec 2012 10:09:19 +0000
(10:09 +0000)
committer
Josef Bacik
<josef@toxicpanda.com>
Mon, 14 Jan 2013 18:52:31 +0000
(13:52 -0500)
When we're deleting the device we should get it in write mode since
we're going to re-write the super block magic on that device. And it
should fail if the device is read-only.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
fs/btrfs/volumes.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index 5cce6aa7401287322c31673cf039f0e32918c6c4..86279c37de6411b72e172eefddf47db7febf346d 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-1431,7
+1431,7
@@
int btrfs_rm_device(struct btrfs_root *root, char *device_path)
}
} else {
ret = btrfs_get_bdev_and_sb(device_path,
- FMODE_
READ
| FMODE_EXCL,
+ FMODE_
WRITE
| FMODE_EXCL,
root->fs_info->bdev_holder, 0,
&bdev, &bh);
if (ret)