diff mbox

[2/3] cifs: fix broken BCC check in is_valid_oplock_break

Message ID 1300302931-13830-2-git-send-email-jlayton@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton March 16, 2011, 7:15 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 718268f..1640a6e 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)
 			(struct smb_com_transaction_change_notify_rsp *)buf;
 		struct file_notify_information *pnotify;
 		__u32 data_offset = 0;
-		if (pSMBr->ByteCount > sizeof(struct file_notify_information)) {
+		if (get_bcc_le(buf) > sizeof(struct file_notify_information)) {
 			data_offset = le32_to_cpu(pSMBr->DataOffset);
 
 			pnotify = (struct file_notify_information *)