Commit graph android_kernel_sony_sdm845/fs/mount.h
Message SHA1
vfs: keep list of mounts for each superblock
Keep track of vfsmounts belonging to a superblock.  List is protected
by vfsmount_lock.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Miklos Szeredi   authored and   Al Viro   commited 2012-01-06 23:20:12 -05:00
39f7c4db1d
switch mnt_namespace ->root to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:13 -05:00
be08d6d260
vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
rationale: that stuff is far tighter bound to fs/namespace.c than to
the guts of procfs proper.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:13 -05:00
0226f4923f
vfs: move fsnotify junk to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:12 -05:00
c63181e6b6
vfs: move mnt_devname
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:11 -05:00
52ba1621de
vfs: move mnt_list to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:11 -05:00
1a4eeaf2a8
vfs: move the rest of int fields to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:10 -05:00
863d684f94
vfs: mnt_id/mnt_group_id moved
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:10 -05:00
15169fe784
vfs: mnt_ns moved to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:09 -05:00
143c8c91ce
vfs: take mnt_share/mnt_slave/mnt_slave_list and mnt_expire to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:08 -05:00
6776db3d32
vfs: and now we can make ->mnt_master point to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:08 -05:00
32301920f4
vfs: take mnt_master to struct mount
make IS_MNT_SLAVE take struct mount * at the same time

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:08 -05:00
d10e8def07
vfs: take mnt_child/mnt_mounts to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:06 -05:00
6b41d536f7
vfs: all counters taken to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:06 -05:00
68e8a9feab
vfs: move mnt_mountpoint to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:05 -05:00
a73324da7a
vfs: now it can be done - make mnt_parent point to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:05 -05:00
0714a53380
vfs: mnt_parent moved to struct mount
the second victim...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:04 -05:00
3376f34fff
vfs: spread struct mount - mnt_has_parent
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:04 -05:00
676da58df7
vfs: the first spoils - mnt_hash moved
taken out of struct vfsmount into struct mount

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:57:02 -05:00
1b8e5564b9
vfs: spread struct mount - __lookup_mnt() result
switch __lookup_mnt() to returning struct mount *; callers adjusted.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:56:58 -05:00
c71053659e
vfs: start hiding vfsmount guts series
Almost all fields of struct vfsmount are used only by core VFS (and
a fairly small part of it, at that).  The plan: embed struct vfsmount
into struct mount, making the latter visible only to core parts of VFS.
Then move fields from vfsmount to mount, eventually leaving only
mnt_root/mnt_sb/mnt_flags in struct vfsmount.  Filesystem code still
gets pointers to struct vfsmount and remains unchanged; all such
pointers go to struct vfsmount embedded into the instances of struct
mount allocated by fs/namespace.c.  When fs/namespace.c et.al. get
a pointer to vfsmount, they turn it into pointer to mount (using
container_of) and work with that.

This is the first part of series; struct mount is introduced,
allocation switched to using it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:56:57 -05:00
7d6fec45a5
vfs: new internal helper: mnt_has_parent(mnt)
vfsmounts have ->mnt_parent pointing either to a different vfsmount
or to itself; it's never NULL and termination condition in loops
traversing the tree towards root is mnt == mnt->mnt_parent.  At least
one place (see the next patch) is confused about what's going on;
let's add an explicit helper checking it right way and use it in
all places where we need it.  Not that there had been too many,
but...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2012-01-03 22:52:36 -05:00
b2dba1af3c