Skip to content

Commit 7cd3c41

Browse files
committed
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
2 parents 82821be + e54fd07 commit 7cd3c41

5 files changed

Lines changed: 6 additions & 7 deletions

File tree

fs/cifs/connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3740,7 +3740,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
37403740

37413741
if (!ses->binding) {
37423742
ses->capabilities = server->capabilities;
3743-
if (linuxExtEnabled == 0)
3743+
if (!linuxExtEnabled)
37443744
ses->capabilities &= (~server->vals->cap_unix);
37453745

37463746
if (ses->auth_key.response) {

fs/cifs/dfs_cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,8 @@ void dfs_cache_del_vol(const char *fullpath)
12601260
vi = find_vol(fullpath);
12611261
spin_unlock(&vol_list_lock);
12621262

1263-
kref_put(&vi->refcnt, vol_release);
1263+
if (!IS_ERR(vi))
1264+
kref_put(&vi->refcnt, vol_release);
12641265
}
12651266

12661267
/**

fs/cifs/fs_context.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ do { \
303303
int
304304
smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx)
305305
{
306-
int rc = 0;
307-
308306
memcpy(new_ctx, ctx, sizeof(*ctx));
309307
new_ctx->prepath = NULL;
310308
new_ctx->mount_options = NULL;
@@ -327,7 +325,7 @@ smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx
327325
DUP_CTX_STR(nodename);
328326
DUP_CTX_STR(iocharset);
329327

330-
return rc;
328+
return 0;
331329
}
332330

333331
static int

fs/cifs/smb2pdu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3248,7 +3248,7 @@ __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
32483248
free_rsp_buf(resp_buftype, rsp);
32493249

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

32543254
tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid,

fs/cifs/smb2pdu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ struct smb2_rdma_transform_capabilities_context {
424424
__le16 TransformCount;
425425
__u16 Reserved1;
426426
__u32 Reserved2;
427-
__le16 RDMATransformIds[1];
427+
__le16 RDMATransformIds[];
428428
} __packed;
429429

430430
/* Signing algorithms */

0 commit comments

Comments
 (0)