kernel_optimize_test/fs/sysfs
Tejun Heo 8312a8d7c1 sysfs: use iget_locked() instead of new_inode()
After dentry is reclaimed, sysfs always used to allocate new dentry
and inode if the file is accessed again.  This causes problem with
operations which only pin the inode.  For example, if inotify watch is
added to a sysfs file and the dentry for the file is reclaimed, the
next update event creates new dentry and new inode making the inotify
watch miss all the events from there on.

This patch fixes it by using iget_locked() instead of new_inode().
sysfs_new_inode() is renamed to sysfs_get_inode() and inode is
initialized iff the inode is newly allocated.  sysfs_instantiate() is
responsible for unlocking new inodes.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11 16:09:07 -07:00
..
bin.c sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
dir.c sysfs: use iget_locked() instead of new_inode() 2007-07-11 16:09:07 -07:00
file.c sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
group.c security: prevent permission checking of file removal via sysfs_remove_group() 2007-04-27 10:57:33 -07:00
inode.c sysfs: use iget_locked() instead of new_inode() 2007-07-11 16:09:07 -07:00
Makefile
mount.c sysfs: reorganize sysfs_new_indoe() and sysfs_create() 2007-07-11 16:09:07 -07:00
symlink.c sysfs: reimplement symlink using sysfs_dirent tree 2007-07-11 16:09:04 -07:00
sysfs.h sysfs: use iget_locked() instead of new_inode() 2007-07-11 16:09:07 -07:00