]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - kernel/acct.c
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-artful-kernel.git] / kernel / acct.c
index 7afa31564162d4acc03bd4ed34144ba459e11bdf..9f3391090b3e826d1d7cb935e58f7d01aa054b37 100644 (file)
@@ -215,6 +215,7 @@ static void acct_file_reopen(struct bsd_acct_struct *acct, struct file *file,
 static int acct_on(char *name)
 {
        struct file *file;
+       struct vfsmount *mnt;
        int error;
        struct pid_namespace *ns;
        struct bsd_acct_struct *acct = NULL;
@@ -256,11 +257,12 @@ static int acct_on(char *name)
                acct = NULL;
        }
 
-       mnt_pin(file->f_path.mnt);
+       mnt = file->f_path.mnt;
+       mnt_pin(mnt);
        acct_file_reopen(ns->bacct, file, ns);
        spin_unlock(&acct_lock);
 
-       mntput(file->f_path.mnt); /* it's pinned, now give up active reference */
+       mntput(mnt); /* it's pinned, now give up active reference */
        kfree(acct);
 
        return 0;