Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272267
b: refs/heads/master
c: f6d90b4
h: refs/heads/master
i:
  272265: 444a923
  272263: e890d01
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Nov 1, 2011
1 parent 04c3313 commit 9c618ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: c87d5d594736dd8b56df67e31846c7d7b8c41a8f
refs/heads/master: f6d90b4f9ce018bff429d6e01ee672de712b8641
14 changes: 6 additions & 8 deletions trunk/fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,15 +865,13 @@ int sysfs_rename(struct sysfs_dirent *sd,
sd->s_name = new_name;
}

/* Remove from old parent's list and insert into new parent's list. */
if (sd->s_parent != new_parent_sd) {
sysfs_unlink_sibling(sd);
sysfs_get(new_parent_sd);
sysfs_put(sd->s_parent);
sd->s_parent = new_parent_sd;
sysfs_link_sibling(sd);
}
/* Move to the appropriate place in the appropriate directories rbtree. */
sysfs_unlink_sibling(sd);
sysfs_get(new_parent_sd);
sysfs_put(sd->s_parent);
sd->s_ns = new_ns;
sd->s_parent = new_parent_sd;
sysfs_link_sibling(sd);

error = 0;
out:
Expand Down

0 comments on commit 9c618ae

Please sign in to comment.