Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346733
b: refs/heads/master
c: b8b8ff5
h: refs/heads/master
i:
  346731: a557920
v: v3
  • Loading branch information
Lukas Czerner authored and Chris Mason committed Dec 17, 2012
1 parent c755c0a commit 9cee7f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac6a2b36f9fcfbe4865550afb6d333dec6b57578
refs/heads/master: b8b8ff590f99678616f9ea85f5088542d1cfc0be
16 changes: 16 additions & 0 deletions trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ static void free_fs_devices(struct btrfs_fs_devices *fs_devices)
kfree(fs_devices);
}

static void btrfs_kobject_uevent(struct block_device *bdev,
enum kobject_action action)
{
int ret;

ret = kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, action);
if (ret)
pr_warn("Sending event '%d' to kobject: '%s' (%p): failed\n",
action,
kobject_name(&disk_to_dev(bdev->bd_disk)->kobj),
&disk_to_dev(bdev->bd_disk)->kobj);
}

void btrfs_cleanup_fs_uuids(void)
{
struct btrfs_fs_devices *fs_devices;
Expand Down Expand Up @@ -1542,6 +1555,9 @@ 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);

error_brelse:
brelse(bh);
if (bdev)
Expand Down

0 comments on commit 9cee7f7

Please sign in to comment.