X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filehash.c;h=0d61f54cca0b2f8c526cd639f9749716069aa8ff;hp=c6ebe761282edd5ef645042c2bbed7f8ff98792c;hb=6d5a9bc27c167e06b83d56a75b4db4ecc017cd0d;hpb=10aa136bddbaa7c845ab4eacb4a9a4a88d6657a3 diff --git a/filehash.c b/filehash.c index c6ebe761..0d61f54c 100644 --- a/filehash.c +++ b/filehash.c @@ -21,12 +21,14 @@ static unsigned short hash(const char *name) void fio_file_hash_lock(void) { - fio_mutex_down(hash_lock); + if (hash_lock) + fio_mutex_down(hash_lock); } void fio_file_hash_unlock(void) { - fio_mutex_up(hash_lock); + if (hash_lock) + fio_mutex_up(hash_lock); } void remove_file_hash(struct fio_file *f)