diff options
author | Steve French <smfrench@gmail.com> | 2012-09-19 18:19:39 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-25 04:46:34 +0200 |
commit | 12e8a20824677fbc24e921d7aebfda6a47cc25b1 (patch) | |
tree | ef2e1e208d6a698d6e9468e3e49762a95d9a9f1f /fs/cifs/smb2misc.c | |
parent | MARK SMB2 support EXPERIMENTAL (diff) | |
download | linux-12e8a20824677fbc24e921d7aebfda6a47cc25b1.tar.xz linux-12e8a20824677fbc24e921d7aebfda6a47cc25b1.zip |
Trivial endian fixes
Some trivial endian fixes for the SMB2 code. One
warning remains which I asked Pavel to look at.
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r-- | fs/cifs/smb2misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index cd31715f03f4..7b1c5e3287fb 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -422,7 +422,8 @@ smb2_is_valid_lease_break(char *buffer, struct TCP_Server_Info *server) struct cifs_pending_open *open; struct smb2_lease_break_work *lw; bool found; - int ack_req = rsp->Flags & SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED; + int ack_req = le32_to_cpu(rsp->Flags & + SMB2_NOTIFY_BREAK_LEASE_FLAG_ACK_REQUIRED); lw = kmalloc(sizeof(struct smb2_lease_break_work), GFP_KERNEL); if (!lw) { @@ -524,7 +525,7 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) if (rsp->hdr.Command != SMB2_OPLOCK_BREAK) return false; - if (le16_to_cpu(rsp->StructureSize) != + if (rsp->StructureSize != smb2_rsp_struct_sizes[SMB2_OPLOCK_BREAK_HE]) { if (le16_to_cpu(rsp->StructureSize) == 44) return smb2_is_valid_lease_break(buffer, server); |