]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - fs/btrfs/volumes.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git for-chris...
[~shefty/rdma-dev.git] / fs / btrfs / volumes.c
index 15f6efdf6463589531f8d1507b74c9d8afd35a3d..5cbb7f4b16720fc3c3442ffb09752983195836a5 100644 (file)
@@ -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);