diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-08-07 07:51:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-08-07 14:40:08 -0400 |
commit | 215748e67d893169de9e62c3416e9e035e9e9c5f (patch) | |
tree | 5a9d7296ea50260ed6207e33f14d2f319105ef26 /kernel | |
parent | 17c0a5aaffa63da6b5c73a31e36616bdcd12d143 (diff) | |
download | linux-215748e67d893169de9e62c3416e9e035e9e9c5f.tar.gz linux-215748e67d893169de9e62c3416e9e035e9e9c5f.tar.bz2 linux-215748e67d893169de9e62c3416e9e035e9e9c5f.zip |
acct: move mnt_pin() upwards.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/acct.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index d9ebc96b1126..2d9e04d98998 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -206,7 +206,6 @@ static void acct_kill(struct bsd_acct_struct *acct, ns->bacct = new; if (new) { struct vfsmount *m = new->file->f_path.mnt; - mnt_pin(m); spin_lock(&acct_lock); hlist_add_head(&new->s_list, &m->mnt_sb->s_pins); hlist_add_head(&new->m_list, &real_mount(m)->mnt_pins); @@ -256,6 +255,7 @@ static int acct_on(struct filename *pathname) acct->ns = ns; mutex_init(&acct->lock); mnt = file->f_path.mnt; + mnt_pin(mnt); old = acct_get(ns); mutex_lock_nested(&acct->lock, 1); /* nobody has seen it yet */ @@ -264,7 +264,6 @@ static int acct_on(struct filename *pathname) } else { ns->bacct = acct; spin_lock(&acct_lock); - mnt_pin(mnt); hlist_add_head(&acct->s_list, &mnt->mnt_sb->s_pins); hlist_add_head(&acct->m_list, &real_mount(mnt)->mnt_pins); spin_unlock(&acct_lock); |