Skip to content
Commit 0bfaa9c5 authored by Eric Sandeen's avatar Eric Sandeen Committed by Chris Mason
Browse files

btrfs: test for valid bdev before kobj removal in btrfs_rm_device



commit 99994cde btrfs: dev delete should remove sysfs entry
added a btrfs_kobj_rm_device, which dereferences device->bdev...
right after we check whether device->bdev might be NULL.

I don't honestly know if it's possible to have a NULL device->bdev
here, but assuming that it is (given the test), we need to move
the kobject removal to be under that test.

(Coverity spotted this)

Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 98ce2ded
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment