]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: fix bugs in sysfs_rename/move_dir()
authorTejun Heo <htejun@gmail.com>
Wed, 16 Jan 2008 03:10:53 +0000 (12:10 +0900)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 16 Jan 2008 17:54:03 +0000 (09:54 -0800)
commitb5c927050a926dc90e2d5359361e90e1813ee37b
tree4ad211cbaff6056d9f1c9aded2d24e83b1641c31
parentc385cb4e884e6131f0fd1e7ef38d548a4e80e5d5
sysfs: fix bugs in sysfs_rename/move_dir()

sysfs_rename/move_dir() have the following bugs.

 - On dentry lookup failure, kfree() is called on ERR_PTR() value.
 - sysfs_move_dir() has an extra dput() on success path.

Fix them.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/sysfs/dir.c