Skip to content

Commit a769bee

Browse files
bharathsm-mssmfrench
authored andcommitted
smb: use macros instead of constants for leasekey size and default cifsattrs value
Replace default hardcoded value for cifsAttrs with ATTR_ARCHIVE macro Use SMB2_LEASE_KEY_SIZE macro for leasekey size in smb2_lease_break Signed-off-by: Bharath SM <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 78d4f34 commit a769bee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/smb/client/cifsfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ cifs_alloc_inode(struct super_block *sb)
398398
cifs_inode = alloc_inode_sb(sb, cifs_inode_cachep, GFP_KERNEL);
399399
if (!cifs_inode)
400400
return NULL;
401-
cifs_inode->cifsAttrs = 0x20; /* default */
401+
cifs_inode->cifsAttrs = ATTR_ARCHIVE; /* default */
402402
cifs_inode->time = 0;
403403
/*
404404
* Until the file is open and we have gotten oplock info back from the

fs/smb/client/smb2pdu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6204,7 +6204,7 @@ SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,
62046204
req->StructureSize = cpu_to_le16(36);
62056205
total_len += 12;
62066206

6207-
memcpy(req->LeaseKey, lease_key, 16);
6207+
memcpy(req->LeaseKey, lease_key, SMB2_LEASE_KEY_SIZE);
62086208
req->LeaseState = lease_state;
62096209

62106210
flags |= CIFS_NO_RSP_BUF;

0 commit comments

Comments
 (0)