Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752522AbcCBN0O (ORCPT ); Wed, 2 Mar 2016 08:26:14 -0500 Received: from linuxhacker.ru ([217.76.32.60]:41274 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751350AbcCBN0N (ORCPT ); Wed, 2 Mar 2016 08:26:13 -0500 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Lustre Development List , Oleg Drokin , Amitoj Kaur Chawla Subject: [PATCH] staging/lustre: Unbreak ll_prep_inode iget result check Date: Wed, 2 Mar 2016 08:25:39 -0500 Message-Id: <1456925139-1058929-1-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1246 Lines: 32 From: Oleg Drokin commit 020ecc6f3229 ("staging: lustre: llite: Remove IS_ERR tests") managed to break one of the converted checks by losing a dereference causing the condition to be wrong and hence leading to a crash later on in case of actual error. IS_ERR_OR_NULL(*inode) got converted into !inode. Signed-off-by: Oleg Drokin CC: Amitoj Kaur Chawla --- I am not sure where did that patch came from as I cannot see it in either my inbox or in any public mailinglists via google. drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index b2e8475..acdae25 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1972,7 +1972,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, *inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1, sbi->ll_flags & LL_SBI_32BIT_API), &md); - if (!inode) { + if (!*inode) { #ifdef CONFIG_FS_POSIX_ACL if (md.posix_acl) { posix_acl_release(md.posix_acl); -- 2.1.0