]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
sysfs: flatten and fix sysfs_rename_dir() error handling
authorTejun Heo <htejun@gmail.com>
Wed, 13 Jun 2007 18:45:14 +0000 (03:45 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:09:03 +0000 (16:09 -0700)
commit996b73764e9bb9d5e751fd15b130ba38637d66a8
treeb8fe0310d1d37da2c2434d1398c12b5ae82b929f
parentdfeb9fb0343363aadc3ee00a9347d120bc2a26b1
sysfs: flatten and fix sysfs_rename_dir() error handling

Error handling in sysfs_rename_dir() was broken.

* When lookup_one_len() fails, 0 is returned.

* If parent inode check fails, returns with inode mutex and rename
  rwsem held.

This patch fixes the above bugs and flattens error handling such that
it's more readable and easier to modify.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c