projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57ba86c
)
btrfs: don't try to notify udev about missing devices
author
Eric Sandeen
<
[email protected]
>
Thu, 31 Jan 2013 00:55:02 +0000
(
00:55
+0000)
committer
Chris Mason
<
[email protected]
>
Fri, 1 Feb 2013 16:47:37 +0000
(11:47 -0500)
If we remove a missing device, bdev is null, and if we
send that off to btrfs_kobject_uevent we'll panic.
Signed-off-by: Eric Sandeen <
[email protected]
>
Signed-off-by: Josef Bacik <
[email protected]
>
Signed-off-by: Chris Mason <
[email protected]
>
fs/btrfs/volumes.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index 5cce6aa7401287322c31673cf039f0e32918c6c4..485a5423e3c6152fd752c4f7aab9f5ee9911a3e0 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-1556,7
+1556,8
@@
int btrfs_rm_device(struct btrfs_root *root, char *device_path)
ret = 0;
/* Notify udev that device has changed */
- btrfs_kobject_uevent(bdev, KOBJ_CHANGE);
+ if (bdev)
+ btrfs_kobject_uevent(bdev, KOBJ_CHANGE);
error_brelse:
brelse(bh);