sysfs: fix hardlink count on device_move
commit21081bf8b7ee03472c941e38db3d1b7ffa778cac
authorPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Tue, 14 Jul 2009 15:56:15 +0000 (14 17:56 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 16 Aug 2009 21:18:25 +0000 (16 14:18 -0700)
tree877d9223888903a89411044213ad85bfb8767f69
parent8a42f28cde25721fad467fe0fcff915ba7e073b7
sysfs: fix hardlink count on device_move

commit 0f58b44582001c8bcdb75f36cf85ebbe5170e959 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c