tmpfs - Use atomic_fetchadd_long() to allocate inode numbers
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 31 Oct 2018 01:50:03 +0000 (18:50 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 31 Oct 2018 01:50:03 +0000 (18:50 -0700)
commit5af112ab74684a87cb5fe9e8e313d7f5187bde86
tree1d8d06f883ccd466568837948ce31ead426071d7
parentddec9e61ea71e07fc90922027c433c850db5a3ad
tmpfs - Use atomic_fetchadd_long() to allocate inode numbers

* Since DFly inode numbers are 64 bits wide, tmpfs just increments a
  per-mount counter to allocate a new inode.

* We had some old code in tmpfs to allocate inode numbers which wrapped
  a tmpfs mount lock around the increment.  This is totally unnecessary.
  Use atomic_fetchadd_long() instead.

Reported-by: mjg
sys/vfs/tmpfs/tmpfs_subr.c