diff options
-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, | |||
206 | ns->bacct = new; | 206 | ns->bacct = new; |
207 | if (new) { | 207 | if (new) { |
208 | struct vfsmount *m = new->file->f_path.mnt; | 208 | struct vfsmount *m = new->file->f_path.mnt; |
209 | mnt_pin(m); | ||
210 | spin_lock(&acct_lock); | 209 | spin_lock(&acct_lock); |
211 | hlist_add_head(&new->s_list, &m->mnt_sb->s_pins); | 210 | hlist_add_head(&new->s_list, &m->mnt_sb->s_pins); |
212 | hlist_add_head(&new->m_list, &real_mount(m)->mnt_pins); | 211 | hlist_add_head(&new->m_list, &real_mount(m)->mnt_pins); |
@@ -256,6 +255,7 @@ static int acct_on(struct filename *pathname) | |||
256 | acct->ns = ns; | 255 | acct->ns = ns; |
257 | mutex_init(&acct->lock); | 256 | mutex_init(&acct->lock); |
258 | mnt = file->f_path.mnt; | 257 | mnt = file->f_path.mnt; |
258 | mnt_pin(mnt); | ||
259 | 259 | ||
260 | old = acct_get(ns); | 260 | old = acct_get(ns); |
261 | mutex_lock_nested(&acct->lock, 1); /* nobody has seen it yet */ | 261 | mutex_lock_nested(&acct->lock, 1); /* nobody has seen it yet */ |
@@ -264,7 +264,6 @@ static int acct_on(struct filename *pathname) | |||
264 | } else { | 264 | } else { |
265 | ns->bacct = acct; | 265 | ns->bacct = acct; |
266 | spin_lock(&acct_lock); | 266 | spin_lock(&acct_lock); |
267 | mnt_pin(mnt); | ||
268 | hlist_add_head(&acct->s_list, &mnt->mnt_sb->s_pins); | 267 | hlist_add_head(&acct->s_list, &mnt->mnt_sb->s_pins); |
269 | hlist_add_head(&acct->m_list, &real_mount(mnt)->mnt_pins); | 268 | hlist_add_head(&acct->m_list, &real_mount(mnt)->mnt_pins); |
270 | spin_unlock(&acct_lock); | 269 | spin_unlock(&acct_lock); |