summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsencrypt.c
diff options
context:
space:
mode:
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>2022-08-23 15:52:00 +0300
committerSteve French <stfrench@microsoft.com>2022-08-25 06:29:59 +0300
commit9789de8bdc92a9ec95c9bc7b43e94de91acc4460 (patch)
tree2ff02511b4a0cb0b131b3927dc5b785762b06735 /fs/cifs/cifsencrypt.c
parenta1d2eb51f0a33c28f5399a1610e66b3fbd24e884 (diff)
downloadlinux-9789de8bdc92a9ec95c9bc7b43e94de91acc4460.tar.xz
cifs: Use help macro to get the header preamble size
It's better to use HEADER_PREAMBLE_SIZE because the unfolded expression too long. No actual functional changes, minor readability improvement. Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r--fs/cifs/cifsencrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 8f7835ccbca1..61a9fed56548 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -32,7 +32,7 @@ int __cifs_calc_signature(struct smb_rqst *rqst,
int rc;
struct kvec *iov = rqst->rq_iov;
int n_vec = rqst->rq_nvec;
- int is_smb2 = server->vals->header_preamble_size == 0;
+ bool is_smb2 = HEADER_PREAMBLE_SIZE(server) == 0;
/* iov[0] is actual data and not the rfc1002 length for SMB2+ */
if (is_smb2) {