From: Ben Evans Date: Tue, 13 Feb 2018 19:20:18 +0000 (-0500) Subject: LU-10662 llite: Add exit for filedata allocation failed X-Git-Tag: 2.10.59~28 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=d9edfa50683aeed6a3c215dc623652b30bd34812;p=fs%2Flustre-release.git LU-10662 llite: Add exit for filedata allocation failed 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 Change-Id: I670d578f01b2731761e3149db36dd8da1551a30a Cray-bug-id: LUS-1321 Reviewed-on: https://review.whamcloud.com/31296 Reviewed-by: Patrick Farrell Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alexandr Boyko Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 68adb40..e33d030 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -526,7 +526,7 @@ int ll_file_open(struct inode *inode, struct file *file) 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)) @@ -695,6 +695,7 @@ out_openerr: 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);