• Al Viro's avatar
    locking in fs/9p ->readdir() · 7ffdea7e
    Al Viro authored
    	... 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: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
vfs_dir.c 6.01 KB