Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75519
b: refs/heads/master
c: 456ef15
h: refs/heads/master
i:
  75517: 5d95785
  75515: d10a28a
  75511: a178d0c
  75503: 440f488
  75487: 3159dbe
  75455: 0574f19
  75391: 6e6905c
  75263: 37a838c
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Jan 16, 2008
1 parent a12a3b4 commit b8e1b9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: e49452c67703d3647467d65275fb893589384fed
refs/heads/master: 456ef1553cb2b06729d64c1d1f0f2bda34e9b201
4 changes: 3 additions & 1 deletion trunk/fs/sysfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ int sysfs_rename_dir(struct kobject * kobj, const char *new_name)
old_dentry = sysfs_get_dentry(sd);
if (IS_ERR(old_dentry)) {
error = PTR_ERR(old_dentry);
old_dentry = NULL;
goto out;
}

Expand Down Expand Up @@ -850,13 +851,15 @@ int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent_kobj)
old_dentry = sysfs_get_dentry(sd);
if (IS_ERR(old_dentry)) {
error = PTR_ERR(old_dentry);
old_dentry = NULL;
goto out;
}
old_parent = old_dentry->d_parent;

new_parent = sysfs_get_dentry(new_parent_sd);
if (IS_ERR(new_parent)) {
error = PTR_ERR(new_parent);
new_parent = NULL;
goto out;
}

Expand All @@ -880,7 +883,6 @@ int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent_kobj)
error = 0;
d_add(new_dentry, NULL);
d_move(old_dentry, new_dentry);
dput(new_dentry);

/* Remove from old parent's list and insert into new parent's list. */
sysfs_unlink_sibling(sd);
Expand Down

0 comments on commit b8e1b9d

Please sign in to comment.