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>
This commit is contained in:
Steve French 2019-10-05 10:53:58 -05:00
parent 30573a82fb
commit d0959b080b
3 changed files with 6 additions and 9 deletions

View File

@ -1210,7 +1210,7 @@ struct cifs_search_info {
bool smallBuf:1; /* so we know which buf_release function to call */ bool smallBuf:1; /* so we know which buf_release function to call */
}; };
#define ACL_NO_MODE -1 #define ACL_NO_MODE ((umode_t)(-1))
struct cifs_open_parms { struct cifs_open_parms {
struct cifs_tcon *tcon; struct cifs_tcon *tcon;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;

View File

@ -4445,7 +4445,7 @@ static int setup_dfs_tgt_conn(const char *path,
int rc; int rc;
struct dfs_info3_param ref = {0}; struct dfs_info3_param ref = {0};
char *mdata = NULL, *fake_devname = NULL; char *mdata = NULL, *fake_devname = NULL;
struct smb_vol fake_vol = {0}; struct smb_vol fake_vol = {NULL};
cifs_dbg(FYI, "%s: dfs path: %s\n", __func__, path); cifs_dbg(FYI, "%s: dfs path: %s\n", __func__, path);

View File

@ -751,8 +751,8 @@ add_posix_context(struct kvec *iov, unsigned int *num_iovec, umode_t mode)
unsigned int num = *num_iovec; unsigned int num = *num_iovec;
iov[num].iov_base = create_posix_buf(mode); iov[num].iov_base = create_posix_buf(mode);
if (mode == -1) if (mode == ACL_NO_MODE)
cifs_dbg(VFS, "illegal mode\n"); /* BB REMOVEME */ cifs_dbg(FYI, "illegal mode\n");
if (iov[num].iov_base == NULL) if (iov[num].iov_base == NULL)
return -ENOMEM; return -ENOMEM;
iov[num].iov_len = sizeof(struct create_posix); 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,
return rc; return rc;
} }
/* TODO: add handling for the mode on create */ if ((oparms->disposition == FILE_CREATE) &&
if (oparms->disposition == FILE_CREATE) (oparms->mode != ACL_NO_MODE)) {
cifs_dbg(VFS, "mode is 0x%x\n", oparms->mode); /* BB REMOVEME */
if ((oparms->disposition == FILE_CREATE) && (oparms->mode != -1)) {
if (n_iov > 2) { if (n_iov > 2) {
struct create_context *ccontext = struct create_context *ccontext =
(struct create_context *)iov[n_iov-1].iov_base; (struct create_context *)iov[n_iov-1].iov_base;