From patchwork Tue Aug 20 14:33:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChenXiaoSong X-Patchwork-Id: 13770276 Received: from smtpbgeu2.qq.com (smtpbgeu2.qq.com [18.194.254.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 466DA1922EF; Tue, 20 Aug 2024 14:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.194.254.142 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724164612; cv=none; b=ngp23P6pIl6gzU/WPbnqFO2i1bOxTTcm6gpaivDItYsovza8ubIv5NLIpfrpscnOPNdn7q55RYv6AWLgV4bdG4ZA1KlfPsMpMfx1Y3qgHrnE8hzbZuTcHOtfwcP0grN+lTrJkNx0OX8OXzsGO5pTyeKDg0wIOKdDxF8/p9G3q1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724164612; c=relaxed/simple; bh=bBvDy7/6KrDhN+z7mAyor5oq4SSHkGap5G5Iw6V1tJ0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PImUmXcatBoPgAGeWoQLyuzUQbIs4qM+C8xPl1b9g1yjLHGdl1xo0JquZ3MWYsROIlj+c3eT6Iu+T41ZxTnc529k+dbr9gRAabr80RIj0e6PNFE6pzSwt0B6PGCW8+UvX81LpZZidWZ8xQM507e8nExEJsvhTKMs8F7zapkLUh4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chenxiaosong.com; spf=pass smtp.mailfrom=chenxiaosong.com; arc=none smtp.client-ip=18.194.254.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chenxiaosong.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chenxiaosong.com X-QQ-mid: bizesmtpsz13t1724164437tyf93n X-QQ-Originating-IP: yqk3UkeqByQJsO86tVOnVl2RVOLhncNNAmyhXCjlCJc= Received: from localhost.localdomain ( [116.128.244.171]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 20 Aug 2024 22:33:42 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 4272407034101322349 From: chenxiaosong@chenxiaosong.com To: linkinjeon@kernel.org, sfrench@samba.org, senozhatsky@chromium.org, tom@talpey.com, linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, pc@manguebit.com, ronniesahlberg@gmail.com, sprasad@microsoft.com, bharathsm@microsoft.com Cc: chenxiaosong@kylinos.cn, liuzhengyuan@kylinos.cn, huhai@kylinos.cn, liuyun01@kylinos.cn, ChenXiaoSong Subject: [PATCH 1/8] smb/server: fix return value of smb2_open() Date: Tue, 20 Aug 2024 14:33:12 +0000 Message-Id: <20240820143319.274033-2-chenxiaosong@chenxiaosong.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240820143319.274033-1-chenxiaosong@chenxiaosong.com> References: <20240820143319.274033-1-chenxiaosong@chenxiaosong.com> Precedence: bulk X-Mailing-List: linux-cifs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpsz:chenxiaosong.com:qybglogicsvrsz:qybglogicsvrsz4a-0 From: ChenXiaoSong In most error cases, error code is not returned in smb2_open(), __process_request() will not print error message. Fix this by returning the correct value at the end of smb2_open(). Signed-off-by: ChenXiaoSong Acked-by: Namjae Jeon --- fs/smb/server/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index 2df1354288e6..d8a827e0dced 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -3710,7 +3710,7 @@ int smb2_open(struct ksmbd_work *work) kfree(name); kfree(lc); - return 0; + return rc; } static int readdir_info_level_struct_sz(int info_level)