vfs: Fix absolute RCU path walk failures due to uninitialized seq number
authorTim Chen <tim.c.chen@linux.intel.com>
Fri, 15 Apr 2011 18:39:29 +0000 (11:39 -0700)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:42:13 +0000 (11:42 -0700)
commit3c3f98783549c86202bfe7766a5523a85e820017
treea3fcf7c61aeeba3c90191b1f3e580ef0724d7b23
parent98bb2c7d38dd108582c05daa18108af722b6ae80
vfs: Fix absolute RCU path walk failures due to uninitialized seq number

BugLink: http://bugs.launchpad.net/bugs/769042

commit c1530019e311c91d14b24d8e74d233152d806e45 upstream.

During RCU walk in path_lookupat and path_openat, the rcu lookup
frequently failed if looking up an absolute path, because when root
directory was looked up, seq number was not properly set in nameidata.

We dropped out of RCU walk in nameidata_drop_rcu due to mismatch in
directory entry's seq number.  We reverted to slow path walk that need
to take references.

With the following patch, I saw a 50% increase in an exim mail server
benchmark throughput on a 4-socket Nehalem-EX system.

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
fs/namei.c