diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/os_common/os_fs_inmemory.c')
-rw-r--r-- | src/third_party/wiredtiger/src/os_common/os_fs_inmemory.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/os_common/os_fs_inmemory.c b/src/third_party/wiredtiger/src/os_common/os_fs_inmemory.c index 9450cbba1d5..8e71b399f56 100644 --- a/src/third_party/wiredtiger/src/os_common/os_fs_inmemory.c +++ b/src/third_party/wiredtiger/src/os_common/os_fs_inmemory.c @@ -34,6 +34,7 @@ __im_handle_search(WT_SESSION_IMPL *session, WT_FILE_SYSTEM *file_system, const uint64_t bucket, hash; im_fs = (WT_FILE_SYSTEM_INMEM *)file_system; + WT_ASSERT_SPINLOCK_OWNED(session, &im_fs->lock); hash = __wt_hash_city64(name, strlen(name)); bucket = hash & (S2C(session)->hash_size - 1); @@ -58,6 +59,13 @@ __im_handle_remove( im_fs = (WT_FILE_SYSTEM_INMEM *)file_system; + /* + * We should hold the file system lock unless we are destroying the file system, in which case + * would call this with the force argument set to true. + */ + if (!force) + WT_ASSERT_SPINLOCK_OWNED(session, &im_fs->lock); + if (im_fh->ref != 0) { __wt_err(session, EBUSY, "%s: file-remove", im_fh->iface.name); if (!force) |