Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59131
b: refs/heads/master
c: 7f7cfff
h: refs/heads/master
i:
  59129: f55ada1
  59127: 0fdd91b
v: v3
  • Loading branch information
Tejun Heo authored and Greg Kroah-Hartman committed Jul 11, 2007
1 parent 72d9d94 commit 420ff55
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 42b37df6abb42ae021e15bf865b43f3629c7f3ab
refs/heads/master: 7f7cfffe60ed6271c4028ec79ae1c297b44bcb14
6 changes: 6 additions & 0 deletions trunk/fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ int sysfs_rename_dir(struct kobject * kobj, struct dentry *new_parent,
d_move(kobj->dentry, new_dentry);

list_del_init(&sd->s_sibling);
sysfs_get(parent_sd);
sysfs_put(sd->s_parent);
sd->s_parent = parent_sd;
list_add(&sd->s_sibling, &parent_sd->s_children);

error = 0;
Expand Down Expand Up @@ -550,6 +553,9 @@ int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent)

/* Remove from old parent's list and insert into new parent's list. */
list_del_init(&sd->s_sibling);
sysfs_get(new_parent_sd);
sysfs_put(sd->s_parent);
sd->s_parent = new_parent_sd;
list_add(&sd->s_sibling, &new_parent_sd->s_children);

out:
Expand Down

0 comments on commit 420ff55

Please sign in to comment.