From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev,
Pierre Mariani <pierre.mariani@gmail.com>,
Steve French <stfrench@microsoft.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6 012/102] smb: client: Fix minor whitespace errors and warnings
Date: Thu, 23 May 2024 15:12:37 +0200 [thread overview]
Message-ID: <20240523130342.927260629@linuxfoundation.org> (raw)
In-Reply-To: <20240523130342.462912131@linuxfoundation.org>
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pierre Mariani <pierre.mariani@gmail.com>
[ Upstream commit 0108ce08aed195d200ffbad74c1948bbaefe6625 ]
Fixes no-op checkpatch errors and warnings.
Signed-off-by: Pierre Mariani <pierre.mariani@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 cb3bed8364e07..2466b28379ff8 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -501,6 +501,7 @@ static int reconnect_target_unlocked(struct TCP_Server_Info *server, struct dfs_
static int reconnect_dfs_server(struct TCP_Server_Info *server)
{
struct dfs_cache_tgt_iterator *target_hint = NULL;
+
DFS_CACHE_TGT_LIST(tl);
int num_targets = 0;
int rc = 0;
@@ -763,6 +764,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);
@@ -1418,11 +1420,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)
&& saddr6->sin6_scope_id == vaddr6->sin6_scope_id);
}
@@ -2607,8 +2611,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;
}
@@ -2751,7 +2755,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
@@ -2892,6 +2895,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]);
@@ -2901,6 +2905,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]);
@@ -2935,15 +2940,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)
@@ -3173,6 +3181,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
@@ -3698,7 +3707,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;
@@ -3717,12 +3726,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
next prev parent reply other threads:[~2024-05-23 13:22 UTC|newest]
Thread overview: 114+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 13:12 [PATCH 6.6 000/102] 6.6.32-rc1 review Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 001/102] cifs: Add client version details to NTLM authenticate message Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 002/102] SMB3: clarify some of the unused CreateOption flags Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 003/102] Add definition for new smb3.1.1 command type Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 004/102] smb: use crypto_shash_digest() in symlink_hash() Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 005/102] cifs: print server capabilities in DebugData Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 006/102] smb3: minor RDMA cleanup Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 007/102] smb3: more minor cleanups for session handling routines Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 008/102] smb3: minor cleanup of session handling code Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 009/102] Missing field not being returned in ioctl CIFS_IOC_GET_MNT_INFO Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 010/102] cifs: fix use after free for iface while disabling secondary channels Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 011/102] smb: client: introduce cifs_sfu_make_node() Greg Kroah-Hartman
2024-05-23 13:12 ` Greg Kroah-Hartman [this message]
2024-05-23 13:12 ` [PATCH 6.6 013/102] smb: client: extend smb2_compound_op() to accept more commands Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 014/102] smb: client: allow creating special files via reparse points Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 015/102] smb: client: optimise reparse point querying Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 016/102] smb: client: allow creating symlinks via reparse points Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 017/102] smb: client: cleanup smb2_query_reparse_point() Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 018/102] smb: client: handle special files and symlinks in SMB3 POSIX Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 019/102] cifs: fix in logging in cifs_chan_update_iface Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 020/102] smb3: Improve exception handling in allocate_mr_list() Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 021/102] cifs: Pass unbyteswapped eof value into SMB2_set_eof() Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 022/102] cifs: get rid of dup length check in parse_reparse_point() Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 023/102] cifs: remove unneeded return statement Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 024/102] ksmbd: auth: fix most kernel-doc warnings Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 025/102] ksmbd: vfs: fix all " Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 026/102] cifs: remove redundant variable tcon_exist Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 027/102] cifs: minor comment cleanup Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 028/102] cifs: pick channel for tcon and tdis Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 029/102] cifs: new nt status codes from MS-SMB2 Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 030/102] smb: client: dont clobber ->i_rdev from cached reparse points Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 031/102] cifs: new mount option called retrans Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 032/102] smb: Fix some kernel-doc comments Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 033/102] smb: client: delete "true", "false" defines Greg Kroah-Hartman
2024-05-23 13:12 ` [PATCH 6.6 034/102] cifs: commands that are retried should have replay flag set Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 035/102] cifs: set replay flag for retries of write command Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 036/102] ksmbd: Add kernel-doc for ksmbd_extract_sharename() function Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 037/102] cifs: update the same create_guid on replay Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 038/102] smb: client: handle path separator of created SMB symlinks Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 039/102] smb3: update allocation size more accurately on write completion Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 040/102] smb: client: parse owner/group when creating reparse points Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 041/102] smb: client: get rid of smb311_posix_query_path_info() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 042/102] smb: client: reuse file lease key in compound operations Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 043/102] smb: client: do not defer close open handles to deleted files Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 044/102] smb: client: retry compound request without reusing lease Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 045/102] smb: client: introduce reparse mount option Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 046/102] smb: client: move most of reparse point handling code to common file Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 047/102] smb: client: fix potential broken compound request Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 048/102] smb: client: reduce number of parameters in smb2_compound_op() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 049/102] smb: client: add support for WSL reparse points Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 050/102] smb: client: Fix a NULL vs IS_ERR() check in wsl_set_xattrs() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 051/102] smb: client: introduce SMB2_OP_QUERY_WSL_EA Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 052/102] smb: client: parse uid, gid, mode and dev from WSL reparse points Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 053/102] smb: client: set correct d_type for reparse DFS/DFSR and mount point Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 054/102] smb: client: return reparse type in /proc/mounts Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 055/102] smb3: add dynamic trace point for ioctls Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 056/102] smb: client: negotiate compression algorithms Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 057/102] smb: common: fix fields sizes in compression_pattern_payload_v1 Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 058/102] smb: common: simplify compression headers Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 059/102] ksmbd: mark SMB2_SESSION_EXPIRED to session when destroying previous session Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 060/102] ksmbd: add support for durable handles v1/v2 Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 061/102] cifs: defer close file handles having RH lease Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 062/102] cifs: fixes for get_inode_info Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 063/102] cifs: remove redundant variable assignment Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 064/102] ksmbd: fix possible null-deref in smb_lazy_parent_lease_break_close Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 065/102] ksmbd: Fix spelling mistake "connction" -> "connection" Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 066/102] ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 067/102] ksmbd: fix potencial out-of-bounds when buffer offset is invalid Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 068/102] cifs: Move some extern decls from .c files to .h Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 069/102] smb311: correct incorrect offset field in compression header Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 070/102] smb311: additional compression flag defined in updated protocol spec Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 071/102] smb3: add trace event for mknod Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 072/102] smb: client: fix NULL ptr deref in cifs_mark_open_handles_for_deleted_file() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 073/102] smb: client: instantiate when creating SFU files Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 074/102] cifs: Add tracing for the cifs_tcon struct refcounting Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 075/102] ksmbd: add continuous availability share parameter Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 076/102] smb: smb2pdu.h: Avoid -Wflex-array-member-not-at-end warnings Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 077/102] drm/amd/display: Fix division by zero in setup_dsc_config Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 078/102] net: ks8851: Fix another TX stall caused by wrong ISR flag handling Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 079/102] ice: pass VSI pointer into ice_vc_isvalid_q_id Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 080/102] ice: remove unnecessary duplicate checks for VF VSI ID Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 081/102] Bluetooth: L2CAP: Fix slab-use-after-free in l2cap_connect() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 082/102] Bluetooth: L2CAP: Fix div-by-zero in l2cap_le_flowctl_init() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 083/102] KEYS: trusted: Fix memory leak in tpm2_key_encode() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 084/102] mmc: core: Add HS400 tuning in HS400es initialization Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 085/102] kselftest: Add a ksft_perror() helper Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 086/102] bpf: Add missing BPF_LINK_TYPE invocations Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 087/102] erofs: get rid of erofs_fs_context Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 088/102] erofs: reliably distinguish block based and fscache mode Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 089/102] drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper() Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 090/102] binder: fix max_thread type inconsistency Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 091/102] usb: dwc3: Wait unconditionally after issuing EndXfer command Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 092/102] net: usb: ax88179_178a: fix link status when link is set to down/up Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 093/102] usb: typec: ucsi: displayport: Fix potential deadlock Greg Kroah-Hartman
2024-05-23 13:13 ` [PATCH 6.6 094/102] usb: typec: tipd: fix event checking for tps6598x Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 095/102] serial: kgdboc: Fix NMI-safety problems from keyboard reset code Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 096/102] remoteproc: mediatek: Make sure IPI buffer fits in L2TCM Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 097/102] KEYS: trusted: Do not use WARN when encode fails Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 098/102] admin-guide/hw-vuln/core-scheduling: fix return type of PR_SCHED_CORE_GET Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 099/102] docs: kernel_include.py: Cope with docutils 0.21 Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 100/102] Docs/admin-guide/mm/damon/usage: fix wrong example of DAMOS filter matching sysfs file Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 101/102] block: add a disk_has_partscan helper Greg Kroah-Hartman
2024-05-23 13:14 ` [PATCH 6.6 102/102] block: add a partscan sysfs attribute for disks Greg Kroah-Hartman
2024-05-23 17:04 ` [PATCH 6.6 000/102] 6.6.32-rc1 review SeongJae Park
2024-05-23 17:40 ` Mark Brown
2024-05-23 20:39 ` Florian Fainelli
2024-05-23 21:25 ` Takeshi Ogasawara
2024-05-24 6:53 ` Harshit Mogalapalli
2024-05-24 10:00 ` Anders Roxell
2024-05-24 14:35 ` Shuah Khan
2024-05-24 15:19 ` Jon Hunter
2024-05-24 20:36 ` Ron Economos
2024-05-25 1:07 ` Kelsey Steele
2024-05-25 16:25 ` Allen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240523130342.927260629@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=patches@lists.linux.dev \
--cc=pierre.mariani@gmail.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=stfrench@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox