]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: fix hardlink count on device_move
authorPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Tue, 14 Jul 2009 15:56:15 +0000 (17:56 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Jul 2009 20:45:21 +0000 (13:45 -0700)
commit3439ae9d860d7518cfd1400802259bec632658fd
tree4d9f1a2ff668f37db7f0d5b5076307213868d2fb
parent46a2e3b3d604cc99e346f4fcf5f835b40270142f
sysfs: fix hardlink count on device_move

Update directory hardlink count when moving kobjects to a new parent.
Fixes the following problem which occurs when several devices are
moved to the same parent and then unregistered:

> ls -laF /sys/devices/css0/defunct/
> total 0
> drwxr-xr-x 4294967295 root root    0 2009-07-14 17:02 ./
> drwxr-xr-x        114 root root    0 2009-07-14 17:02 ../
> drwxr-xr-x          2 root root    0 2009-07-14 17:01 power/
> -rw-r--r--          1 root root 4096 2009-07-14 17:01 uevent

Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c