Zheng Bin (5):
cifs: fix comparison to bool warning in cifsacl.c
cifs: fix comparison to bool warning in file.c
cifs: fix comparison to bool warning in smb2misc.c
cifs: fix comparison to bool warning in connect.c
cifs: fix comparison to bool warning in smb2ops.c
fs/cifs/cifsacl.c | 2 +-
fs/cifs/connect.c | 6 +++---
fs/cifs/file.c | 2 +-
fs/cifs/smb2misc.c | 2 +-
fs/cifs/smb2ops.c | 10 +++++-----
5 files changed, 11 insertions(+), 11 deletions(-)
--
2.26.0.106.g9fadedd
Fixes coccicheck warning:
fs/cifs/cifsacl.c:371:6-49: WARNING: Comparison to bool
Signed-off-by: Zheng Bin <[email protected]>
---
fs/cifs/cifsacl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index fcff14ef1c70..9447ff1a5b6a 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -368,7 +368,7 @@ sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid,
else
is_group = false;
- if (is_well_known_sid(psid, &unix_id, is_group) == false)
+ if (!is_well_known_sid(psid, &unix_id, is_group))
goto try_upcall_to_get_id;
if (is_group) {
--
2.26.0.106.g9fadedd
Fixes coccicheck warning:
fs/cifs/connect.c:2478:5-16: WARNING: Comparison to bool
fs/cifs/connect.c:3560:10-35: WARNING: Comparison to bool
fs/cifs/connect.c:4297:6-21: WARNING: Comparison to bool
Signed-off-by: Zheng Bin <[email protected]>
---
fs/cifs/connect.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index a5731dd6e656..4d2651b9f019 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2475,7 +2475,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
else if (override_gid == 1)
pr_notice("ignoring forcegid mount option specified with no gid= option\n");
- if (got_version == false)
+ if (!got_version)
pr_warn_once("No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount.\n");
kfree(mountdata_copy);
@@ -3557,7 +3557,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
}
} else if ((tcon->capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY)
&& (ses->server->capabilities & SMB2_GLOBAL_CAP_PERSISTENT_HANDLES)
- && (volume_info->nopersistent == false)) {
+ && !volume_info->nopersistent) {
cifs_dbg(FYI, "enabling persistent handles\n");
tcon->use_persistent = true;
} else if (volume_info->resilient) {
@@ -4294,7 +4294,7 @@ static int mount_get_conns(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
*nses = ses;
- if ((vol->persistent == true) && (!(ses->server->capabilities &
+ if (vol->persistent && (!(ses->server->capabilities &
SMB2_GLOBAL_CAP_PERSISTENT_HANDLES))) {
cifs_server_dbg(VFS, "persistent handles not supported by server\n");
return -EOPNOTSUPP;
--
2.26.0.106.g9fadedd