Am 05/07/2019 um 18:05 schrieb waddlesplash:
On Fri, Jul 5, 2019 at 9:16 AM Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
That change doesn't look particularly sane. The moment the read lock is
put away, you mustn't access the structure anymore.
There is already Team::Get() which correctly acquires a reference before
losing the lock.
Acquiring a reference, using the team, and then dropping the reference
is a much more costly operation than simply getting the team in the
first place. The goal here is to use a function like this when the
team structure is needed perhaps only for one operation (as you can
see in the next commit, I'm using it to retrieve the uids for
permissions checks.)
Perhaps we should make a function to just get the euid of a specific team?