autofs: don't bother with atomics for ino->count
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 18 Sep 2019 03:31:27 +0000 (23:31 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 18 Sep 2019 03:31:27 +0000 (23:31 -0400)
commit850d71acd52cd331474116fbd60cf8b3f3ded93e
treea4e4412794927eb053a440769510c453d046c43d
parentc3aed16680cd0c0e5abf1bfc0dc1338e6a41b29f
autofs: don't bother with atomics for ino->count

All writers are serialized on inode->i_rwsem.  So are the readers
outside of expire.c.  And the readers in expire.c are in the
code that really doesn't care about narrow races - it's looking
for expiry candidates and its callers have to cope with the
possibility of a good candidate becoming busy right under them.

No point bothering with atomic operations - just use int and
mark the non-serialized readers with READ_ONCE().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/autofs/autofs_i.h
fs/autofs/expire.c
fs/autofs/root.c