locking in fs/9p ->readdir()
authorAl Viro <viro@ZenIV.linux.org.uk>
Sat, 26 Jan 2013 00:11:36 +0000 (00:11 +0000)
committerEric Van Hensbergen <ericvh@gmail.com>
Sun, 10 Feb 2013 22:29:33 +0000 (16:29 -0600)
... is really excessive.  First of all, ->readdir() is serialized by
file->f_path.dentry->d_inode->i_mutex; playing with file->f_path.dentry->d_lock
is not buying you anything.  Moreover, rdir->mutex is pointless for exactly
the same reason - you'll never see contention on it.

While we are at it, there's no point in having rdir->buf a pointer -
you have it point just past the end of rdir, so it might as well be a flex
array (and no, it's not a gccism).

Absolutely untested patch follows:

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>

No differences found