diff options
author | Steve French <stfrench@microsoft.com> | 2019-10-05 11:53:58 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-10-08 21:19:40 -0400 |
commit | d0959b080b1faa9741857ef607c90531b66e2fb8 (patch) | |
tree | afd11a12c826d5deffdb80285b47e555d786313f | |
parent | 30573a82fb179420b8aac30a3a3595aa96a93156 (diff) |
smb3: remove noisy debug message and minor cleanup
Message was intended only for developer temporary build
In addition cleanup two minor warnings noticed by Coverity
and a trivial change to workaround a sparse warning
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
-rw-r--r-- | fs/cifs/cifsglob.h | 2 | ||||
-rw-r--r-- | fs/cifs/connect.c | 2 | ||||
-rw-r--r-- | fs/cifs/smb2pdu.c | 11 |
3 files changed, 6 insertions, 9 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 2e960e1049db..50dfd9049370 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -1210,7 +1210,7 @@ struct cifs_search_info { | |||
1210 | bool smallBuf:1; /* so we know which buf_release function to call */ | 1210 | bool smallBuf:1; /* so we know which buf_release function to call */ |
1211 | }; | 1211 | }; |
1212 | 1212 | ||
1213 | #define ACL_NO_MODE -1 | 1213 | #define ACL_NO_MODE ((umode_t)(-1)) |
1214 | struct cifs_open_parms { | 1214 | struct cifs_open_parms { |
1215 | struct cifs_tcon *tcon; | 1215 | struct cifs_tcon *tcon; |
1216 | struct cifs_sb_info *cifs_sb; | 1216 | struct cifs_sb_info *cifs_sb; |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index b724227b853c..a64dfa95a925 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -4445,7 +4445,7 @@ static int setup_dfs_tgt_conn(const char *path, | |||
4445 | int rc; | 4445 | int rc; |
4446 | struct dfs_info3_param ref = {0}; | 4446 | struct dfs_info3_param ref = {0}; |
4447 | char *mdata = NULL, *fake_devname = NULL; | 4447 | char *mdata = NULL, *fake_devname = NULL; |
4448 | struct smb_vol fake_vol = {0}; | 4448 | struct smb_vol fake_vol = {NULL}; |
4449 | 4449 | ||
4450 | cifs_dbg(FYI, "%s: dfs path: %s\n", __func__, path); | 4450 | cifs_dbg(FYI, "%s: dfs path: %s\n", __func__, path); |
4451 | 4451 | ||
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index fd5f2b4b7582..05149862aea4 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -751,8 +751,8 @@ add_posix_context(struct kvec *iov, unsigned int *num_iovec, umode_t mode) | |||
751 | unsigned int num = *num_iovec; | 751 | unsigned int num = *num_iovec; |
752 | 752 | ||
753 | iov[num].iov_base = create_posix_buf(mode); | 753 | iov[num].iov_base = create_posix_buf(mode); |
754 | if (mode == -1) | 754 | if (mode == ACL_NO_MODE) |
755 | cifs_dbg(VFS, "illegal mode\n"); /* BB REMOVEME */ | 755 | cifs_dbg(FYI, "illegal mode\n"); |
756 | if (iov[num].iov_base == NULL) | 756 | if (iov[num].iov_base == NULL) |
757 | return -ENOMEM; | 757 | return -ENOMEM; |
758 | iov[num].iov_len = sizeof(struct create_posix); | 758 | iov[num].iov_len = sizeof(struct create_posix); |
@@ -2521,11 +2521,8 @@ SMB2_open_init(struct cifs_tcon *tcon, struct smb_rqst *rqst, __u8 *oplock, | |||
2521 | return rc; | 2521 | return rc; |
2522 | } | 2522 | } |
2523 | 2523 | ||
2524 | /* TODO: add handling for the mode on create */ | 2524 | if ((oparms->disposition == FILE_CREATE) && |
2525 | if (oparms->disposition == FILE_CREATE) | 2525 | (oparms->mode != ACL_NO_MODE)) { |
2526 | cifs_dbg(VFS, "mode is 0x%x\n", oparms->mode); /* BB REMOVEME */ | ||
2527 | |||
2528 | if ((oparms->disposition == FILE_CREATE) && (oparms->mode != -1)) { | ||
2529 | if (n_iov > 2) { | 2526 | if (n_iov > 2) { |
2530 | struct create_context *ccontext = | 2527 | struct create_context *ccontext = |
2531 | (struct create_context *)iov[n_iov-1].iov_base; | 2528 | (struct create_context *)iov[n_iov-1].iov_base; |