Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322358
b: refs/heads/master
c: 99f5944
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Aug 28, 2012
1 parent 316f492 commit bad24d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa9ddcd4b5557102fa25695c11904f249b4dec49
refs/heads/master: 99f5944b8477914406173b47b4f261356286730b
8 changes: 5 additions & 3 deletions trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,11 @@ static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
memcpy(new_device, device, sizeof(*new_device));

/* Safe because we are under uuid_mutex */
name = rcu_string_strdup(device->name->str, GFP_NOFS);
BUG_ON(device->name && !name); /* -ENOMEM */
rcu_assign_pointer(new_device->name, name);
if (device->name) {
name = rcu_string_strdup(device->name->str, GFP_NOFS);
BUG_ON(device->name && !name); /* -ENOMEM */
rcu_assign_pointer(new_device->name, name);
}
new_device->bdev = NULL;
new_device->writeable = 0;
new_device->in_fs_metadata = 0;
Expand Down

0 comments on commit bad24d5

Please sign in to comment.