Al Viro
c63181e6b6
vfs: move fsnotify junk to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:12 -05:00
Al Viro
52ba1621de
vfs: move mnt_devname
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:11 -05:00
Al Viro
1a4eeaf2a8
vfs: move mnt_list to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:11 -05:00
Al Viro
fc7be130c7
vfs: switch pnode.h macros to struct mount *
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:11 -05:00
Al Viro
863d684f94
vfs: move the rest of int fields to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:10 -05:00
Al Viro
15169fe784
vfs: mnt_id/mnt_group_id moved
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:10 -05:00
Al Viro
143c8c91ce
vfs: mnt_ns moved to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:09 -05:00
Al Viro
900148dcac
vfs: spread struct mount - mntput_no_expire
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:09 -05:00
Al Viro
95bc5f25c1
vfs: spread struct mount - do_add_mount and graft_tree
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:09 -05:00
Al Viro
6776db3d32
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>
2012-01-03 22:57:08 -05:00
Al Viro
32301920f4
vfs: and now we can make ->mnt_master point to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:08 -05:00
Al Viro
d10e8def07
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>
2012-01-03 22:57:08 -05:00
Al Viro
14cf1fa8f5
vfs: spread struct mount - remaining argument of mnt_set_mountpoint()
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:07 -05:00
Al Viro
a8d56d8e4f
vfs: spread struct mount - propagate_mnt()
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:07 -05:00
Al Viro
c937135d98
vfs: spread struct mount - shared subtree iterators
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:07 -05:00
Al Viro
6fc7871fed
vfs: spread struct mount - get_dominating_id / do_make_slave
...
next pile of horrors, similar to mnt_parent one; this time it's
mnt_master.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:06 -05:00
Al Viro
6b41d536f7
vfs: take mnt_child/mnt_mounts to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:06 -05:00
Al Viro
68e8a9feab
vfs: all counters taken to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:06 -05:00
Al Viro
83adc75322
vfs: spread struct mount - work with counters
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:05 -05:00
Al Viro
a73324da7a
vfs: move mnt_mountpoint to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:05 -05:00
Al Viro
0714a53380
vfs: now it can be done - make mnt_parent point to struct mount
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:05 -05:00
Al Viro
3376f34fff
vfs: mnt_parent moved to struct mount
...
the second victim...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:04 -05:00
Al Viro
643822b41e
vfs: spread struct mount - is_path_reachable
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:04 -05:00
Al Viro
676da58df7
vfs: spread struct mount - mnt_has_parent
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:04 -05:00
Al Viro
1ab5973862
vfs: spread struct mount - do_umount/propagate_mount_busy
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:03 -05:00
Al Viro
44d964d609
vfs: spread struct mount mnt_set_mountpoint child argument
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:03 -05:00
Al Viro
87129cc0e3
vfs: spread struct mount - clone_mnt/copy_tree argument
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:03 -05:00
Al Viro
692afc312b
vfs: spread struct mount - shrink_submounts/select_submounts
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:02 -05:00
Al Viro
761d5c38eb
vfs: spread struct mount - umount_tree argument
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:02 -05:00
Al Viro
1b8e5564b9
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>
2012-01-03 22:57:02 -05:00
Al Viro
d5e50f74dd
vfs: spread struct mount to remaining users of ->mnt_hash
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:01 -05:00
Al Viro
cb338d06e9
vfs: spread struct mount - clone_mnt/copy_tree result
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:01 -05:00
Al Viro
0f0afb1dcf
vfs: spread struct mount - change_mnt_propagation/set_mnt_shared
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:01 -05:00
Al Viro
b105e270b4
vfs: spread struct mount - alloc_vfsmnt/free_vfsmnt/mnt_alloc_id/mnt_free_id
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:00 -05:00
Al Viro
cbbe362cd6
vfs: spread struct mount - tree_contains_unbindable
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:00 -05:00
Al Viro
0fb54e5056
vfs: spread struct mount - attach_recursive_mnt
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:57:00 -05:00
Al Viro
4b8b21f4fe
vfs: spread struct mount - mount group id handling
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:56:59 -05:00
Al Viro
4b2619a571
vfs: spread struct mount - commit_tree
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:56:59 -05:00
Al Viro
419148da6e
vfs: spread struct mount - attach_mnt/detach_mnt
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:56:59 -05:00
Al Viro
315fc83e56
vfs: spread struct mount - namespace.c internal iterators
...
next_mnt() return value, first argument
skip_mnt_tree() return value and argument
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:56:58 -05:00
Al Viro
61ef47b1e4
vfs: spread struct mount - __propagate_umount() argument
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:56:58 -05:00
Al Viro
c71053659e
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>
2012-01-03 22:56:58 -05:00
Al Viro
7d6fec45a5
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>
2012-01-03 22:56:57 -05:00
Al Viro
dabe0dc194
vfs: fix the rest of sget() races
...
unfortunately, just checking MS_BORN after having grabbed ->s_umount in
sget() is not enough; places that pick superblock from a list and
grab s_umount shared need the same check in addition to checking for
->s_root; otherwise three-way race between failing mount, sget() and
such list-walker can leave us with list-walker coming *second*, when
temporary active ref grabbed by sget() (to be dropped when sget()
notices that original mount has failed by checking MS_BORN) has
lead to deactivate_locked_super() from failing ->mount() *not* doing
->kill_sb() and just releasing ->s_umount. Once sget() gets through
and notices that MS_BORN had never been set it will drop the active
ref and fs will be shut down and kicked out of all lists, but it's
too late for something like sync_supers().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:53:10 -05:00
Al Viro
cf31e70d6c
vfs: new helper - vfs_ustat()
...
... and bury user_get_super()/statfs_by_dentry() - they are
purely internal now.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:53:07 -05:00
Al Viro
c972b4bc83
vfs: live vfsmounts never have NULL ->mnt_sb
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:52:42 -05:00
Al Viro
4c1d5a64f1
vfs: for usbfs, etc. internal vfsmounts ->mnt_sb->s_root == ->mnt_root
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:52:41 -05:00
Al Viro
32dc730860
get rid of timer in kern/acct.c
...
... and clean it up a bit, while we are at it
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:52:41 -05:00
Al Viro
84b92d39f9
vfs: pipe.c is really non-modular
...
... so no exitcalls there. Not much would work if pipe(2) would stop
working, after all...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:52:41 -05:00
Al Viro
6b520e0565
vfs: fix the stupidity with i_dentry in inode destructors
...
Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
the cost of taking it into inode_init_always() will be negligible for pipes
and sockets and negative for everything else. Not to mention the removal of
boilerplate code from ->destroy_inode() instances...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-03 22:52:40 -05:00