summaryrefslogtreecommitdiffstats
path: root/kernel/acct.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/acct.c')
-rw-r--r--kernel/acct.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index 7bb9e65..a74f3d1a 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -189,6 +189,12 @@ static void acct_pin_kill(struct fs_pin *pin)
{
struct bsd_acct_struct *acct;
acct = container_of(pin, struct bsd_acct_struct, pin);
+ if (!atomic_long_inc_not_zero(&pin->count)) {
+ rcu_read_unlock();
+ cpu_relax();
+ return;
+ }
+ rcu_read_unlock();
mutex_lock(&acct->lock);
if (!acct->ns) {
mutex_unlock(&acct->lock);
OpenPOWER on IntegriCloud