Commit a769bee5 authored by Bharath SM's avatar Bharath SM Committed by Steve French
Browse files

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: default avatarBharath SM <bharathsm@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 78d4f34e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;