switch mnt_hash to hlist
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 21 Mar 2014 01:10:51 +0000 (21:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Apr 2014 19:02:37 +0000 (12:02 -0700)
commitf8a954ced934f77f2987e4b16a1881419bd6fbf3
treeceb67cc34c6d6c2b9c4381632b7769b8fd5abce9
parent92dbca18848fcc88661cd8a8ec17fd59ecc430cc
switch mnt_hash to hlist

commit 38129a13e6e71f666e0468e99fdd932a687b4d7e upstream.

fixes RCU bug - walking through hlist is safe in face of element moves,
since it's self-terminating.  Cyclic lists are not - if we end up jumping
to another hash chain, we'll loop infinitely without ever hitting the
original list head.

[fix for dumb braino folded]

Spotted by: Max Kellermann <mk@cm4all.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/mount.h
fs/namespace.c
fs/pnode.c
fs/pnode.h