performance/write-behind: handle call-stub leaks

Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d
Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
Fixes: bz#1678570
(cherry picked from commit 6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9)
This commit is contained in:
Raghavendra Gowdappa 2019-02-19 08:04:52 +05:30 committed by Raghavendra G
parent 8d4b8e2644
commit 1f8b2912c8

View File

@ -1928,6 +1928,9 @@ wb_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
unwind:
STACK_UNWIND_STRICT(readv, frame, -1, ENOMEM, NULL, 0, NULL, NULL, NULL);
if (stub)
call_stub_destroy(stub);
return 0;
noqueue:
@ -2010,6 +2013,9 @@ wb_flush(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
unwind:
STACK_UNWIND_STRICT(flush, frame, -1, ENOMEM, NULL);
if (stub)
call_stub_destroy(stub);
return 0;
noqueue:
@ -2053,6 +2059,8 @@ wb_fsync(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync,
unwind:
STACK_UNWIND_STRICT(fsync, frame, -1, op_errno, NULL, NULL, NULL);
if (stub)
call_stub_destroy(stub);
return 0;
noqueue: