alistair23-linux/fs/sysfs
Eric W. Biederman f6d90b4f9c sysfs: Make sysfs_rename safe with sysfs_dirents in rbtrees.
In sysfs_rename we need to remove the optimization of not calling
sysfs_unlink_sibling and sysfs_link_sibling if the renamed parent
directory is not changing.  This optimization is no longer valid now
that sysfs dirents are stored in an rbtree sorted by name.

Move the assignment of s_ns before the call of sysfs_link_sibling.  With
no sysfs_dirent fields changing after the call of sysfs_link_sibling
this allows sysfs_link_sibling to take any of the directory entries into
account when it builds the rbtrees, and s_ns looks like a prime canidate
to be used in the rbtree in the future.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Greg KH <gregkh@suse.de>
Cc: David Miller <davem@davemloft.net>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-01 09:16:14 -07:00
..
bin.c sysfs: only access bin file vm_ops with the active lock 2010-10-22 10:16:43 -07:00
dir.c sysfs: Make sysfs_rename safe with sysfs_dirents in rbtrees. 2011-11-01 09:16:14 -07:00
file.c sysfs: Reject with a warning invalid uses of tagged directories. 2011-10-19 19:24:16 -04:00
group.c SYSFS: Fix erroneous comments for sysfs_update_group(). 2011-05-10 14:22:00 -07:00
inode.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2011-10-25 13:25:22 +02:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mount.c Delay struct net freeing while there's a sysfs instance refering to it 2011-06-12 17:45:41 -04:00
symlink.c sysfs: allow creating symlinks from untagged to tagged directories 2010-07-26 12:02:41 -07:00
sysfs.h sysfs: use rb-tree for inode number lookup 2011-08-22 17:43:53 -07:00