summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-01-10 06:07:35 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2015-01-26 05:16:29 +0100
commit32426f6653cbfde1ca16aff27a530ee36332f796 (patch)
tree87c9d86a5c164745acaf0a20a0ff92485c070bd2 /kernel
parentkill pin_put() (diff)
downloadlinux-32426f6653cbfde1ca16aff27a530ee36332f796.tar.xz
linux-32426f6653cbfde1ca16aff27a530ee36332f796.zip
pull bumping refcount into ->kill()
there will be one more change of ->kill() calling conventions; this isn't final. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/acct.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index 7bb9e659a7da..a74f3d1a0c26 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);