diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-03-16 15:15:30 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-04-11 20:54:30 -0400 |
commit | 8679b0dba7cb98842cbe37f61ef05ef64106334c (patch) | |
tree | 8e66525517c527e8a6e466e6fa5637623784ecf5 /fs/cifs/misc.c | |
parent | 70945643722ffeac779d2529a348f99567fa5c33 (diff) |
cifs: fix broken BCC check in is_valid_oplock_break
The BCC is still __le16 at this point, and in any case we need to
use the get_bcc_le macro to make sure we don't hit alignment
problems.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 7228179ef5b0..0c684ae4c071 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -521,7 +521,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
521 | (struct smb_com_transaction_change_notify_rsp *)buf; | 521 | (struct smb_com_transaction_change_notify_rsp *)buf; |
522 | struct file_notify_information *pnotify; | 522 | struct file_notify_information *pnotify; |
523 | __u32 data_offset = 0; | 523 | __u32 data_offset = 0; |
524 | if (pSMBr->ByteCount > sizeof(struct file_notify_information)) { | 524 | if (get_bcc_le(buf) > sizeof(struct file_notify_information)) { |
525 | data_offset = le32_to_cpu(pSMBr->DataOffset); | 525 | data_offset = le32_to_cpu(pSMBr->DataOffset); |
526 | 526 | ||
527 | pnotify = (struct file_notify_information *) | 527 | pnotify = (struct file_notify_information *) |