diff --git a/lib/blobfs/blobfs.c b/lib/blobfs/blobfs.c index a4eed47f1..5811ee3a4 100644 --- a/lib/blobfs/blobfs.c +++ b/lib/blobfs/blobfs.c @@ -2075,20 +2075,19 @@ spdk_file_write(struct spdk_file *file, struct spdk_io_channel *_channel, } } + pthread_spin_unlock(&file->lock); + if (cache_buffers_filled == 0) { - pthread_spin_unlock(&file->lock); return 0; } args = calloc(1, sizeof(*args)); if (args == NULL) { - pthread_spin_unlock(&file->lock); return -ENOMEM; } args->file = file; file->fs->send_request(__file_flush, args); - pthread_spin_unlock(&file->lock); return 0; }