Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188218
b: refs/heads/master
c: 3a0524d
h: refs/heads/master
v: v3
  • Loading branch information
TARUISI Hiroaki authored and Chris Mason committed Mar 15, 2010
1 parent 704c548 commit 0ba68fa
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 1e701a3292e25a6c4939cad9f24951dc6b6ad853
refs/heads/master: 3a0524dc054791688177544fe510d2868ee20d9f
7 changes: 7 additions & 0 deletions trunk/fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ static noinline int device_list_add(const char *path,
struct btrfs_device *device;
struct btrfs_fs_devices *fs_devices;
u64 found_transid = btrfs_super_generation(disk_super);
char *name;

fs_devices = find_fsid(disk_super->fsid);
if (!fs_devices) {
Expand Down Expand Up @@ -411,6 +412,12 @@ static noinline int device_list_add(const char *path,

device->fs_devices = fs_devices;
fs_devices->num_devices++;
} else if (strcmp(device->name, path)) {
name = kstrdup(path, GFP_NOFS);
if (!name)
return -ENOMEM;
kfree(device->name);
device->name = name;
}

if (found_transid > fs_devices->latest_trans) {
Expand Down

0 comments on commit 0ba68fa

Please sign in to comment.