Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32426f66 authored by Al Viro's avatar Al Viro
Browse files

pull bumping refcount into ->kill()



there will be one more change of ->kill() calling conventions; this
isn't final.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 9e251d02
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -34,12 +34,6 @@ void mnt_pin_kill(struct mount *m)
			break;
		}
		pin = hlist_entry(p, struct fs_pin, m_list);
		if (!atomic_long_inc_not_zero(&pin->count)) {
			rcu_read_unlock();
			cpu_relax();
			continue;
		}
		rcu_read_unlock();
		pin->kill(pin);
	}
}
@@ -56,12 +50,6 @@ void sb_pin_kill(struct super_block *sb)
			break;
		}
		pin = hlist_entry(p, struct fs_pin, s_list);
		if (!atomic_long_inc_not_zero(&pin->count)) {
			rcu_read_unlock();
			cpu_relax();
			continue;
		}
		rcu_read_unlock();
		pin->kill(pin);
	}
}
+6 −0
Original line number Diff line number Diff line
@@ -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);