When the filedata allocation fails, we need to exit to
a later point than out_openerr, which calls
deauthorize_statahead and ll_file_data_put, neither of
which is valid. (This leads to a panic.)
Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: I670d578f01b2731761e3149db36dd8da1551a30a
Cray-bug-id: LUS-1321
Reviewed-on: https://review.whamcloud.com/31296
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
fd = ll_file_data_get();
if (fd == NULL)
- GOTO(out_openerr, rc = -ENOMEM);
+ GOTO(out_nofiledata, rc = -ENOMEM);
fd->fd_file = file;
if (S_ISDIR(inode->i_mode))
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_OPEN, 1);
}
+out_nofiledata:
if (it && it_disposition(it, DISP_ENQ_OPEN_REF)) {
ptlrpc_req_finished(it->it_request);
it_clear_disposition(it, DISP_ENQ_OPEN_REF);