summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-29 12:29:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-29 12:29:08 -0700
commitccf5675a82a72bc1599b9b29cf33f7e391658485 (patch)
tree9a049faa35cdf3eee14005402d03ae3201b2d5fe /fs
parentb7ebbb77f183061eb34dd210372d016c04371c26 (diff)
parenta39ea210ec8c8f6ed381f8dafbe755c57b8f30c3 (diff)
downloadop-kernel-dev-ccf5675a82a72bc1599b9b29cf33f7e391658485.zip
op-kernel-dev-ccf5675a82a72bc1599b9b29cf33f7e391658485.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: driver core: documentation: make it clear that sysfs is optional driver core: sysdev: do not send KOBJ_ADD uevent if kobject_init_and_add fails Dynamic debug: fix typo: -/-> driver core: firmware_class:fix memory leak of page pointers array sysfs: fix hardlink count on device_move
Diffstat (limited to 'fs')
-rw-r--r--fs/sysfs/dir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index d88d0fa..14f2d71 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -939,8 +939,10 @@ again:
/* Remove from old parent's list and insert into new parent's list. */
sysfs_unlink_sibling(sd);
sysfs_get(new_parent_sd);
+ drop_nlink(old_parent->d_inode);
sysfs_put(sd->s_parent);
sd->s_parent = new_parent_sd;
+ inc_nlink(new_parent->d_inode);
sysfs_link_sibling(sd);
out_unlock:
OpenPOWER on IntegriCloud