Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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);
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 */
} 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);