aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-24 20:58:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:57:01 -0500
commitd5e50f74dd2ed6dd1bb4bf6fe58e5a7de4b77953 (patch)
treeb0b9d829ec542a2b972eef0f69f6f54443228ac3
parentcb338d06e9716c92d5a7855e7c67b8f111ced722 (diff)
vfs: spread struct mount to remaining users of ->mnt_hash
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/namespace.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 6051a034db96..76412348d5be 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -199,7 +199,7 @@ static struct mount *alloc_vfsmnt(const char *name)
199 mnt->mnt_writers = 0; 199 mnt->mnt_writers = 0;
200#endif 200#endif
201 201
202 INIT_LIST_HEAD(&mnt->mnt_hash); 202 INIT_LIST_HEAD(&p->mnt.mnt_hash);
203 INIT_LIST_HEAD(&mnt->mnt_child); 203 INIT_LIST_HEAD(&mnt->mnt_child);
204 INIT_LIST_HEAD(&mnt->mnt_mounts); 204 INIT_LIST_HEAD(&mnt->mnt_mounts);
205 INIT_LIST_HEAD(&mnt->mnt_list); 205 INIT_LIST_HEAD(&mnt->mnt_list);
@@ -540,10 +540,10 @@ static void dentry_reset_mounted(struct dentry *dentry)
540 unsigned u; 540 unsigned u;
541 541
542 for (u = 0; u < HASH_SIZE; u++) { 542 for (u = 0; u < HASH_SIZE; u++) {
543 struct vfsmount *p; 543 struct mount *p;
544 544
545 list_for_each_entry(p, &mount_hashtable[u], mnt_hash) { 545 list_for_each_entry(p, &mount_hashtable[u], mnt.mnt_hash) {
546 if (p->mnt_mountpoint == dentry) 546 if (p->mnt.mnt_mountpoint == dentry)
547 return; 547 return;
548 } 548 }
549 } 549 }
@@ -1191,25 +1191,25 @@ EXPORT_SYMBOL(may_umount);
1191 1191
1192void release_mounts(struct list_head *head) 1192void release_mounts(struct list_head *head)
1193{ 1193{
1194 struct vfsmount *mnt; 1194 struct mount *mnt;
1195 while (!list_empty(head)) { 1195 while (!list_empty(head)) {
1196 mnt = list_first_entry(head, struct vfsmount, mnt_hash); 1196 mnt = list_first_entry(head, struct mount, mnt.mnt_hash);
1197 list_del_init(&mnt->mnt_hash); 1197 list_del_init(&mnt->mnt.mnt_hash);
1198 if (mnt_has_parent(mnt)) { 1198 if (mnt_has_parent(&mnt->mnt)) {
1199 struct dentry *dentry; 1199 struct dentry *dentry;
1200 struct vfsmount *m; 1200 struct vfsmount *m;
1201 1201
1202 br_write_lock(vfsmount_lock); 1202 br_write_lock(vfsmount_lock);
1203 dentry = mnt->mnt_mountpoint; 1203 dentry = mnt->mnt.mnt_mountpoint;
1204 m = mnt->mnt_parent; 1204 m = mnt->mnt.mnt_parent;
1205 mnt->mnt_mountpoint = mnt->mnt_root; 1205 mnt->mnt.mnt_mountpoint = mnt->mnt.mnt_root;
1206 mnt->mnt_parent = mnt; 1206 mnt->mnt.mnt_parent = &mnt->mnt;
1207 m->mnt_ghosts--; 1207 m->mnt_ghosts--;
1208 br_write_unlock(vfsmount_lock); 1208 br_write_unlock(vfsmount_lock);
1209 dput(dentry); 1209 dput(dentry);
1210 mntput(m); 1210 mntput(m);
1211 } 1211 }
1212 mntput(mnt); 1212 mntput(&mnt->mnt);
1213 } 1213 }
1214} 1214}
1215 1215