From: Eric W. Biederman Date: Mon, 23 Sep 2013 02:37:01 +0000 (-0700) Subject: vfs: Keep a list of mounts on a mount point X-Git-Tag: omap-for-v3.19/prcm-cleanup~102^2~52 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a5eb7c8189922e86a840972cd0b57e41de6f031;p=pandora-kernel.git vfs: Keep a list of mounts on a mount point To spot any possible problems call BUG if a mountpoint is put when it's list of mounts is not empty. AV: use hlist instead of list_head Reviewed-by: Miklos Szeredi Signed-off-by: Eric W. Biederman Signed-off-by: Al Viro --- diff --git a/fs/mount.h b/fs/mount.h index 8c6a2a651254..68bb03ed7f19 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -21,6 +21,7 @@ struct mnt_pcp { struct mountpoint { struct hlist_node m_hash; struct dentry *m_dentry; + struct hlist_head m_list; int m_count; }; @@ -51,6 +52,7 @@ struct mount { struct mount *mnt_master; /* slave is on master->mnt_slave_list */ struct mnt_namespace *mnt_ns; /* containing namespace */ struct mountpoint *mnt_mp; /* where is it mounted */ + struct hlist_node mnt_mp_list; /* list mounts with the same mountpoint */ #ifdef CONFIG_FSNOTIFY struct hlist_head mnt_fsnotify_marks; __u32 mnt_fsnotify_mask; Reading git-diff-tree failed