mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
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 <bharathsm@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
78d4f34e21
commit
a769bee5f9
@ -398,7 +398,7 @@ cifs_alloc_inode(struct super_block *sb)
|
||||
cifs_inode = alloc_inode_sb(sb, cifs_inode_cachep, GFP_KERNEL);
|
||||
if (!cifs_inode)
|
||||
return NULL;
|
||||
cifs_inode->cifsAttrs = 0x20; /* default */
|
||||
cifs_inode->cifsAttrs = ATTR_ARCHIVE; /* default */
|
||||
cifs_inode->time = 0;
|
||||
/*
|
||||
* Until the file is open and we have gotten oplock info back from the
|
||||
|
@ -6204,7 +6204,7 @@ SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
req->StructureSize = cpu_to_le16(36);
|
||||
total_len += 12;
|
||||
|
||||
memcpy(req->LeaseKey, lease_key, 16);
|
||||
memcpy(req->LeaseKey, lease_key, SMB2_LEASE_KEY_SIZE);
|
||||
req->LeaseState = lease_state;
|
||||
|
||||
flags |= CIFS_NO_RSP_BUF;
|
||||
|
Loading…
Reference in New Issue
Block a user