Commit 7cd3c412 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag '5.11-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "Two small cifs fixes for stable (including an important handle leak
  fix) and three small cleanup patches"

* tag '5.11-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: style: replace one-element array with flexible-array
  cifs: connect: style: Simplify bool comparison
  fs: cifs: remove unneeded variable in smb3_fs_context_dup
  cifs: fix interrupted close commands
  cifs: check pointer before freeing
parents 82821be8 e54fd071
...@@ -3740,7 +3740,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, ...@@ -3740,7 +3740,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
if (!ses->binding) { if (!ses->binding) {
ses->capabilities = server->capabilities; ses->capabilities = server->capabilities;
if (linuxExtEnabled == 0) if (!linuxExtEnabled)
ses->capabilities &= (~server->vals->cap_unix); ses->capabilities &= (~server->vals->cap_unix);
if (ses->auth_key.response) { if (ses->auth_key.response) {
......
...@@ -1260,6 +1260,7 @@ void dfs_cache_del_vol(const char *fullpath) ...@@ -1260,6 +1260,7 @@ void dfs_cache_del_vol(const char *fullpath)
vi = find_vol(fullpath); vi = find_vol(fullpath);
spin_unlock(&vol_list_lock); spin_unlock(&vol_list_lock);
if (!IS_ERR(vi))
kref_put(&vi->refcnt, vol_release); kref_put(&vi->refcnt, vol_release);
} }
......
...@@ -303,8 +303,6 @@ do { \ ...@@ -303,8 +303,6 @@ do { \
int int
smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx) smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx)
{ {
int rc = 0;
memcpy(new_ctx, ctx, sizeof(*ctx)); memcpy(new_ctx, ctx, sizeof(*ctx));
new_ctx->prepath = NULL; new_ctx->prepath = NULL;
new_ctx->mount_options = NULL; new_ctx->mount_options = NULL;
...@@ -327,7 +325,7 @@ smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx ...@@ -327,7 +325,7 @@ smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx
DUP_CTX_STR(nodename); DUP_CTX_STR(nodename);
DUP_CTX_STR(iocharset); DUP_CTX_STR(iocharset);
return rc; return 0;
} }
static int static int
......
...@@ -3248,7 +3248,7 @@ __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -3248,7 +3248,7 @@ __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
free_rsp_buf(resp_buftype, rsp); free_rsp_buf(resp_buftype, rsp);
/* retry close in a worker thread if this one is interrupted */ /* retry close in a worker thread if this one is interrupted */
if (rc == -EINTR) { if (is_interrupt_error(rc)) {
int tmp_rc; int tmp_rc;
tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid, tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid,
......
...@@ -424,7 +424,7 @@ struct smb2_rdma_transform_capabilities_context { ...@@ -424,7 +424,7 @@ struct smb2_rdma_transform_capabilities_context {
__le16 TransformCount; __le16 TransformCount;
__u16 Reserved1; __u16 Reserved1;
__u32 Reserved2; __u32 Reserved2;
__le16 RDMATransformIds[1]; __le16 RDMATransformIds[];
} __packed; } __packed;
/* Signing algorithms */ /* Signing algorithms */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment