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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3740,7 +3740,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,

	if (!ses->binding) {
		ses->capabilities = server->capabilities;
		if (linuxExtEnabled == 0)
		if (!linuxExtEnabled)
			ses->capabilities &= (~server->vals->cap_unix);

		if (ses->auth_key.response) {
+2 −1
Original line number Diff line number Diff line
@@ -1260,6 +1260,7 @@ void dfs_cache_del_vol(const char *fullpath)
	vi = find_vol(fullpath);
	spin_unlock(&vol_list_lock);

	if (!IS_ERR(vi))
		kref_put(&vi->refcnt, vol_release);
}

+1 −3
Original line number Diff line number Diff line
@@ -303,8 +303,6 @@ do { \
int
smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx)
{
	int rc = 0;

	memcpy(new_ctx, ctx, sizeof(*ctx));
	new_ctx->prepath = 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
	DUP_CTX_STR(nodename);
	DUP_CTX_STR(iocharset);

	return rc;
	return 0;
}

static int
+1 −1
Original line number Diff line number Diff line
@@ -3248,7 +3248,7 @@ __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
	free_rsp_buf(resp_buftype, rsp);

	/* retry close in a worker thread if this one is interrupted */
	if (rc == -EINTR) {
	if (is_interrupt_error(rc)) {
		int tmp_rc;

		tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid,
+1 −1
Original line number Diff line number Diff line
@@ -424,7 +424,7 @@ struct smb2_rdma_transform_capabilities_context {
	__le16	TransformCount;
	__u16	Reserved1;
	__u32	Reserved2;
	__le16	RDMATransformIds[1];
	__le16	RDMATransformIds[];
} __packed;

/* Signing algorithms */