Justus Winter, le Fri 23 May 2014 09:48:35 +0200, a écrit :
> It is an optimization.  This way we can use just 1 atomic operation
> when trivfs_peropen_destroy_hook is not used, and 3 when it is.  If we
> do it like you described, we need two in any case.

Then you could rather use something like:

if (trivfs_peropen_destroy_hook)
{
  do it in two operations
}
else
{
  do it in one operation
}

It doesn't duplicate too much code.

Samuel

Reply via email to