Commit ea1132a9 authored by Changpeng Liu's avatar Changpeng Liu
Browse files

blobfs: free sync request if got error with flush request allocation



Change-Id: I13bd02b1083816781980bcd7af7a6dd27235ed7d
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464360


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent baa49be9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2666,6 +2666,7 @@ _file_sync(struct spdk_file *file, struct spdk_fs_channel *channel,
	flush_req = alloc_fs_request(channel);
	if (!flush_req) {
		SPDK_ERRLOG("Cannot allocate flush req for file=%s\n", file->name);
		free_fs_request(sync_req);
		pthread_spin_unlock(&file->lock);
		cb_fn(cb_arg, -ENOMEM);
		return;