tux3: tux_assign_inum takes goal as a parameter

The inum layout policy must run in a context where it has the
parent directory and position in the directory file available,
so do not try to do that in alloc_inum, instead just give it
the goal we really want. These are the same parameters and
semantics as tux_assign_inum, so use that name.

A stack variable plays better with the multitasking frontend,
than a global variable, but the sb->nextinum update in dir.c
is now racy, so do something about that. The race is mostly
harmless, it might be enough just to make sb->nextinum atomic.

Signed-off-by: Daniel Phillips <d.phillips@partner.samsung.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
3 files changed