blobfs: free sync request if got error with flush request allocation
Change-Id: I13bd02b1083816781980bcd7af7a6dd27235ed7d Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464360 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
baa49be957
commit
ea1132a926
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user