switch mnt_hash to hlist

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>
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
此提交包含在:
Al Viro
2014-03-20 21:10:51 -04:00
父節點 0b1b901b5a
當前提交 38129a13e6
共有 4 個檔案被更改,包括 61 行新增50 行删除

查看文件

@@ -25,7 +25,7 @@ struct mountpoint {
};
struct mount {
struct list_head mnt_hash;
struct hlist_node mnt_hash;
struct mount *mnt_parent;
struct dentry *mnt_mountpoint;
struct vfsmount mnt;