linux-kernel-test/fs/sysfs
Tejun Heo a1da4dfe35 sysfs: kill an extra put in sysfs_create_link() failure path
There is a subtle bug in sysfs_create_link() failure path.  When
symlink creation fails because there's already a node with the same
name, the target sysfs_dirent is put twice - once by failure path of
sysfs_create_link() and once more when the symlink is released.

Fix it by making only the symlink node responsible for putting
target_sd.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Gabriel C <nix.or.die@googlemail.com>
Cc: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-18 15:49:50 -07:00
..
bin.c sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
dir.c sysfs: avoid kmem_cache_free(NULL) 2007-07-18 15:49:49 -07:00
file.c sysfs: make directory dentries and inodes reclaimable 2007-07-11 16:09:09 -07:00
group.c sysfs: make kobj point to sysfs_dirent instead of dentry 2007-07-11 16:09:08 -07:00
inode.c sysfs: make sysfs_init_inode() static 2007-07-18 15:49:49 -07:00
Makefile
mount.c sysfs: fix sysfs root inode nlink accounting 2007-07-18 15:49:49 -07:00
symlink.c sysfs: kill an extra put in sysfs_create_link() failure path 2007-07-18 15:49:50 -07:00
sysfs.h sysfs: make sysfs_init_inode() static 2007-07-18 15:49:49 -07:00