]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
sysfs: make sysfs_add_one() automatically check for duplicate entry
authorTejun Heo <htejun@gmail.com>
Thu, 2 Aug 2007 12:38:03 +0000 (21:38 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:51:04 +0000 (14:51 -0700)
commit23dc279950a056c33a14d09cf759f5173d41abd9
tree852f8cc24c24988717dbae8f98da999ff27755fa
parent41fc1c27452e041a18e5141b8203ee0ea72bc483
sysfs: make sysfs_add_one() automatically check for duplicate entry

Make sysfs_add_one() check for duplicate entry and return -EEXIST if
such entry exists.  This simplifies node addition code a bit.

This patch doesn't introduce any noticeable behavior change.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c
fs/sysfs/file.c
fs/sysfs/symlink.c
fs/sysfs/sysfs.h