summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-25 00:57:42 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:57:10 -0500
commit863d684f946eb240c7dd57d265d88315950ca5cc (patch)
tree99b3c84299b2e273465f023bcbcc16a231529260 /fs/namespace.c
parent15169fe784a9846b24cdb0840329d41aebc23249 (diff)
downloadop-kernel-dev-863d684f946eb240c7dd57d265d88315950ca5cc.zip
op-kernel-dev-863d684f946eb240c7dd57d265d88315950ca5cc.tar.gz
vfs: move the rest of int fields to struct mount
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index dfed9a2..c7b8dbc 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -787,9 +787,9 @@ put_again:
return;
br_write_lock(vfsmount_lock);
#endif
- if (unlikely(mnt->mnt.mnt_pinned)) {
- mnt_add_count(mnt, mnt->mnt.mnt_pinned + 1);
- mnt->mnt.mnt_pinned = 0;
+ if (unlikely(mnt->mnt_pinned)) {
+ mnt_add_count(mnt, mnt->mnt_pinned + 1);
+ mnt->mnt_pinned = 0;
br_write_unlock(vfsmount_lock);
acct_auto_close_mnt(&mnt->mnt);
goto put_again;
@@ -801,10 +801,11 @@ put_again:
void mntput(struct vfsmount *mnt)
{
if (mnt) {
+ struct mount *m = real_mount(mnt);
/* avoid cacheline pingpong, hope gcc doesn't get "smart" */
- if (unlikely(mnt->mnt_expiry_mark))
- mnt->mnt_expiry_mark = 0;
- mntput_no_expire(real_mount(mnt));
+ if (unlikely(m->mnt_expiry_mark))
+ m->mnt_expiry_mark = 0;
+ mntput_no_expire(m);
}
}
EXPORT_SYMBOL(mntput);
@@ -820,16 +821,17 @@ EXPORT_SYMBOL(mntget);
void mnt_pin(struct vfsmount *mnt)
{
br_write_lock(vfsmount_lock);
- mnt->mnt_pinned++;
+ real_mount(mnt)->mnt_pinned++;
br_write_unlock(vfsmount_lock);
}
EXPORT_SYMBOL(mnt_pin);
-void mnt_unpin(struct vfsmount *mnt)
+void mnt_unpin(struct vfsmount *m)
{
+ struct mount *mnt = real_mount(m);
br_write_lock(vfsmount_lock);
if (mnt->mnt_pinned) {
- mnt_add_count(real_mount(mnt), 1);
+ mnt_add_count(mnt, 1);
mnt->mnt_pinned--;
}
br_write_unlock(vfsmount_lock);
@@ -1200,17 +1202,17 @@ void release_mounts(struct list_head *head)
list_del_init(&mnt->mnt_hash);
if (mnt_has_parent(mnt)) {
struct dentry *dentry;
- struct vfsmount *m;
+ struct mount *m;
br_write_lock(vfsmount_lock);
dentry = mnt->mnt_mountpoint;
- m = &mnt->mnt_parent->mnt;
+ m = mnt->mnt_parent;
mnt->mnt_mountpoint = mnt->mnt.mnt_root;
mnt->mnt_parent = mnt;
m->mnt_ghosts--;
br_write_unlock(vfsmount_lock);
dput(dentry);
- mntput(m);
+ mntput(&m->mnt);
}
mntput(&mnt->mnt);
}
@@ -1239,7 +1241,7 @@ void umount_tree(struct mount *mnt, int propagate, struct list_head *kill)
__mnt_make_shortterm(p);
list_del_init(&p->mnt_child);
if (mnt_has_parent(p)) {
- p->mnt_parent->mnt.mnt_ghosts++;
+ p->mnt_parent->mnt_ghosts++;
dentry_reset_mounted(p->mnt_mountpoint);
}
change_mnt_propagation(p, MS_PRIVATE);
@@ -1281,7 +1283,7 @@ static int do_umount(struct mount *mnt, int flags)
}
br_write_unlock(vfsmount_lock);
- if (!xchg(&mnt->mnt.mnt_expiry_mark, 1))
+ if (!xchg(&mnt->mnt_expiry_mark, 1))
return -EAGAIN;
}
@@ -2106,7 +2108,7 @@ void mark_mounts_for_expiry(struct list_head *mounts)
* cleared by mntput())
*/
list_for_each_entry_safe(mnt, next, mounts, mnt_expire) {
- if (!xchg(&mnt->mnt.mnt_expiry_mark, 1) ||
+ if (!xchg(&mnt->mnt_expiry_mark, 1) ||
propagate_mount_busy(mnt, 1))
continue;
list_move(&mnt->mnt_expire, &graveyard);
OpenPOWER on IntegriCloud