diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2021-01-05 18:53:45 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-01-17 04:45:24 +0000 |
commit | 208ebc381f51f80a39489e3a1b5fa4e704ac9359 (patch) | |
tree | a0d60d40d4849930bf45165b85a5f4a10c0258a1 | |
parent | 77ac245e9e3245b88623dc853975a37a3e7d0369 (diff) | |
download | src-208ebc381f51f80a39489e3a1b5fa4e704ac9359.tar.gz src-208ebc381f51f80a39489e3a1b5fa4e704ac9359.zip |
tmpfs_free_tmp(): explicitly assert that tmp is locked
(cherry picked from commit 9f200bc47b5d8445d91d51f6dfd6af0f1fbbe354)
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vfsops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 942d2d499b26..c9c211dca002 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -529,8 +529,9 @@ tmpfs_unmount(struct mount *mp, int mntflags) void tmpfs_free_tmp(struct tmpfs_mount *tmp) { - + TMPFS_MP_ASSERT_LOCKED(tmp); MPASS(tmp->tm_refcount > 0); + tmp->tm_refcount--; if (tmp->tm_refcount > 0) { TMPFS_UNLOCK(tmp); |