]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/acct.c
bpf: devmap: fix wrong interface selection in notifier_call
[mirror_ubuntu-bionic-kernel.git] / kernel / acct.c
index 6670fbd3e466d3003ae3c20d5f321b6e0abb2069..81f9831a785925382824fd765f574941d08e9e01 100644 (file)
@@ -102,7 +102,7 @@ static int check_free_space(struct bsd_acct_struct *acct)
 {
        struct kstatfs sbuf;
 
-       if (time_is_before_jiffies(acct->needcheck))
+       if (time_is_after_jiffies(acct->needcheck))
                goto out;
 
        /* May block */
@@ -147,7 +147,7 @@ static struct bsd_acct_struct *acct_get(struct pid_namespace *ns)
 again:
        smp_rmb();
        rcu_read_lock();
-       res = to_acct(ACCESS_ONCE(ns->bacct));
+       res = to_acct(READ_ONCE(ns->bacct));
        if (!res) {
                rcu_read_unlock();
                return NULL;
@@ -159,7 +159,7 @@ again:
        }
        rcu_read_unlock();
        mutex_lock(&res->lock);
-       if (res != to_acct(ACCESS_ONCE(ns->bacct))) {
+       if (res != to_acct(READ_ONCE(ns->bacct))) {
                mutex_unlock(&res->lock);
                acct_put(res);
                goto again;
@@ -227,7 +227,7 @@ static int acct_on(struct filename *pathname)
                filp_close(file, NULL);
                return PTR_ERR(internal);
        }
-       err = mnt_want_write(internal);
+       err = __mnt_want_write(internal);
        if (err) {
                mntput(internal);
                kfree(acct);
@@ -252,7 +252,7 @@ static int acct_on(struct filename *pathname)
        old = xchg(&ns->bacct, &acct->pin);
        mutex_unlock(&acct->lock);
        pin_kill(old);
-       mnt_drop_write(mnt);
+       __mnt_drop_write(mnt);
        mntput(mnt);
        return 0;
 }