Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp182309rdb; Mon, 15 Jan 2024 17:34:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5I/H2+Tk4rK17dUpw3kNQgcXurRlUaloXec31bu/NuNF1/5anLpYqABBkcl6XqoBeEfVB X-Received: by 2002:a25:2e45:0:b0:dc2:1e2e:3e87 with SMTP id b5-20020a252e45000000b00dc21e2e3e87mr790246ybn.58.1705368859106; Mon, 15 Jan 2024 17:34:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705368859; cv=none; d=google.com; s=arc-20160816; b=OyGG0hxirgyfQvv2YJ0V5HioEEXVqbrAhst3BIQLMTHKrit+AJtPlyyljRETkIcuxo w43nCd/fAzrXGzZA+AumwBk8wTkuikaCuJiEj40wEZ3JRv4BjMI2r+iho+NwR86lPwJu mMFQGjNmG62QTIWf6HfZApg/6ehpSIJmXmderBl7QeeFlfTyIZ+Rg/RxOSwZ47uKN2S1 /KDiHobJXvfH6MpVzZRGdXO0wG7K7E0wxmneOt4uF+X3OnyE1QFdzGrK2qh3cCStXxo4 UasIHhrwmPbajgnZ8xv8tIA6KBWqf3V1NG8sC8H6b2uyP1QSZSCWQ9PGXOU7oCv28Yor xv+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=R0NxykwduUKfoFsipv6RGulYJO128W5Ro74Vh3c/a84=; fh=q2qVkscOEay00B3lY1nyovKiiVLZam+i4YxjMeVsRqE=; b=GB/b2Csjg2h2371/7K0yykKkJa6dotamzcnRHR/sc2VVoof8YGAuDpljfn/Zg68Mui 2Vna+reot2ffrWj4wJNkY+7WAb1wOYz4HN5xet+YJKbLYuQDZHuUP/UgF8Aph5mbuVnf jzIwEOKlnH543wbH0usIMF05xGy2RCk881VwB0GjUJY5Ec73n3F3zqRxKI2ULZaqMqT4 YV94iDW2L30h6oDVGsvYdB1COTo/oT+2RfNrwa0QncJXM/1ShMmILjwlxGnrsg9rw/9T fex0F/7VVotMXW0cuv9sgfEPXman4XRSeENw6cZbG3Fvx0p47EBVD8jFOtUZgabl9pUd RRSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cPvemb1K; spf=pass (google.com: domain of linux-kernel+bounces-26859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m15-20020a17090a2c0f00b0028bf7ab5a92si10340647pjd.147.2024.01.15.17.34.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:34:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cPvemb1K; spf=pass (google.com: domain of linux-kernel+bounces-26859-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26859-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BBEBB2828BF for ; Tue, 16 Jan 2024 01:34:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 313E524B4D; Tue, 16 Jan 2024 01:07:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cPvemb1K" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5EAF724B34; Tue, 16 Jan 2024 01:07:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DAEFC43390; Tue, 16 Jan 2024 01:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705367222; bh=3Xn+TQjC/XxyKiykUgEySBxJAIvXhcs1C8OC1hjGp28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cPvemb1KMowPueK2oR9rBjr93pFfEFTRT72d5DKBYhJky/IYe0EKLGEE87yB9wqRi Mg+o6Sw9PqHaD9tEoEXOxZ9v7ZsH27PWhFhQcjTpXIrdMIZ+LNTIWNcWRpLrivMTBf v+2ytBzG2TKGX8XXPdYo6CfC7xvja1VM9Zx4EZyFhgMGOJ381Mcp3jBMitbRU+Fo5q JETcb7eL2yC9erCF6sv2/Ip5rk1MB6hzyqjeQyJAuTdF/QK4EZHH9zrv23FJ2hM0h6 wI6jRe2R0ON7LFGEa8zAvcYSLq2R5smVRcO+A1lsdsFttWw2Mx1PPLfB40xX5a+63t 1Ag0RP1yLJBiQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pierre Mariani , Steve French , Sasha Levin , sfrench@samba.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org Subject: [PATCH AUTOSEL 6.1 09/14] smb: client: Fix minor whitespace errors and warnings Date: Mon, 15 Jan 2024 20:06:11 -0500 Message-ID: <20240116010642.218876-9-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240116010642.218876-1-sashal@kernel.org> References: <20240116010642.218876-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.73 Content-Transfer-Encoding: 8bit From: Pierre Mariani [ Upstream commit 0108ce08aed195d200ffbad74c1948bbaefe6625 ] Fixes no-op checkpatch errors and warnings. Signed-off-by: Pierre Mariani Signed-off-by: Steve French Signed-off-by: Sasha Levin --- fs/smb/client/connect.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index f725a119ce31..a957efaa5e74 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -505,6 +505,7 @@ static int reconnect_dfs_server(struct TCP_Server_Info *server) { int rc = 0; const char *refpath = server->current_fullpath + 1; + struct dfs_cache_tgt_list tl = DFS_CACHE_TGT_LIST_INIT(tl); struct dfs_cache_tgt_iterator *target_hint = NULL; int num_targets = 0; @@ -773,6 +774,7 @@ cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, { struct msghdr smb_msg = {}; struct kvec iov = {.iov_base = buf, .iov_len = to_read}; + iov_iter_kvec(&smb_msg.msg_iter, ITER_DEST, &iov, 1, to_read); return cifs_readv_from_socket(server, &smb_msg); @@ -1412,11 +1414,13 @@ cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs) case AF_INET: { struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr; struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs; + return (saddr4->sin_addr.s_addr == vaddr4->sin_addr.s_addr); } case AF_INET6: { struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)srcaddr; struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs; + return ipv6_addr_equal(&saddr6->sin6_addr, &vaddr6->sin6_addr); } default: @@ -2588,8 +2592,8 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) rc = -EOPNOTSUPP; goto out_fail; } else { - cifs_dbg(VFS, "Check vers= mount option. SMB3.11 " - "disabled but required for POSIX extensions\n"); + cifs_dbg(VFS, + "Check vers= mount option. SMB3.11 disabled but required for POSIX extensions\n"); rc = -EOPNOTSUPP; goto out_fail; } @@ -2733,7 +2737,6 @@ cifs_put_tlink(struct tcon_link *tlink) if (!IS_ERR(tlink_tcon(tlink))) cifs_put_tcon(tlink_tcon(tlink)); kfree(tlink); - return; } static int @@ -2867,6 +2870,7 @@ static inline void cifs_reclassify_socket4(struct socket *sock) { struct sock *sk = sock->sk; + BUG_ON(!sock_allow_reclassification(sk)); sock_lock_init_class_and_name(sk, "slock-AF_INET-CIFS", &cifs_slock_key[0], "sk_lock-AF_INET-CIFS", &cifs_key[0]); @@ -2876,6 +2880,7 @@ static inline void cifs_reclassify_socket6(struct socket *sock) { struct sock *sk = sock->sk; + BUG_ON(!sock_allow_reclassification(sk)); sock_lock_init_class_and_name(sk, "slock-AF_INET6-CIFS", &cifs_slock_key[1], "sk_lock-AF_INET6-CIFS", &cifs_key[1]); @@ -2910,15 +2915,18 @@ static int bind_socket(struct TCP_Server_Info *server) { int rc = 0; + if (server->srcaddr.ss_family != AF_UNSPEC) { /* Bind to the specified local IP address */ struct socket *socket = server->ssocket; + rc = kernel_bind(socket, (struct sockaddr *) &server->srcaddr, sizeof(server->srcaddr)); if (rc < 0) { struct sockaddr_in *saddr4; struct sockaddr_in6 *saddr6; + saddr4 = (struct sockaddr_in *)&server->srcaddr; saddr6 = (struct sockaddr_in6 *)&server->srcaddr; if (saddr6->sin6_family == AF_INET6) @@ -3146,6 +3154,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, if (!CIFSSMBQFSUnixInfo(xid, tcon)) { __u64 cap = le64_to_cpu(tcon->fsUnixInfo.Capability); + cifs_dbg(FYI, "unix caps which server supports %lld\n", cap); /* * check for reconnect case in which we do not @@ -3997,7 +4006,7 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses, smb_buffer_response = smb_buffer; header_assemble(smb_buffer, SMB_COM_TREE_CONNECT_ANDX, - NULL /*no tid */ , 4 /*wct */ ); + NULL /*no tid */, 4 /*wct */); smb_buffer->Mid = get_next_mid(ses->server); smb_buffer->Uid = ses->Suid; @@ -4016,12 +4025,12 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses, if (ses->server->sign) smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; - if (ses->capabilities & CAP_STATUS32) { + if (ses->capabilities & CAP_STATUS32) smb_buffer->Flags2 |= SMBFLG2_ERR_STATUS; - } - if (ses->capabilities & CAP_DFS) { + + if (ses->capabilities & CAP_DFS) smb_buffer->Flags2 |= SMBFLG2_DFS; - } + if (ses->capabilities & CAP_UNICODE) { smb_buffer->Flags2 |= SMBFLG2_UNICODE; length = -- 2.43.0