diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index b6c303f..5ecda55 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1183,16 +1183,11 @@
 	char *smb_read_data;
 	char __user *current_offset;
 	struct smb_com_read_rsp *pSMBr;
-	int use_old_read = FALSE;
 
 	xid = GetXid();
 	cifs_sb = CIFS_SB(file->f_dentry->d_sb);
 	pTcon = cifs_sb->tcon;
 
-	if(pTcon->ses)
-		if((pTcon->ses->capabilities & CAP_LARGE_FILES) == 0)
-			use_old_read = TRUE;
-
 	if (file->private_data == NULL) {
 		FreeXid(xid);
 		return -EBADF;
@@ -1217,22 +1212,10 @@
 				if (rc != 0)
 					break;
 			}
-			if(use_old_read)
-				rc = SMBLegacyRead(xid, pTcon,
+			rc = CIFSSMBRead(xid, pTcon,
 					open_file->netfid,
 					current_read_size, *poffset,
 					&bytes_read, &smb_read_data);
-			else {
-				rc = CIFSSMBRead(xid, pTcon,
-					open_file->netfid,
-					current_read_size, *poffset,
-					&bytes_read, &smb_read_data);
-				if(rc == -EINVAL) {
-					use_old_read = TRUE;
-					rc = -EAGAIN;
-					continue;
-				}
-			}
 			pSMBr = (struct smb_com_read_rsp *)smb_read_data;
 			if (copy_to_user(current_offset, 
 					 smb_read_data + 4 /* RFC1001 hdr */
@@ -1276,7 +1259,6 @@
 	int xid;
 	char *current_offset;
 	struct cifsFileInfo *open_file;
-	int use_old_read = FALSE;
 
 	xid = GetXid();
 	cifs_sb = CIFS_SB(file->f_dentry->d_sb);
@@ -1287,9 +1269,6 @@
 		return -EBADF;
 	}
 	open_file = (struct cifsFileInfo *)file->private_data;
-	if(pTcon->ses)
-		if((pTcon->ses->capabilities & CAP_LARGE_FILES) == 0)
-			use_old_read = TRUE;
 
 	if ((file->f_flags & O_ACCMODE) == O_WRONLY)
 		cFYI(1, ("attempting read on write only file instance"));
@@ -1308,24 +1287,10 @@
 				if (rc != 0)
 					break;
 			}
-			if(use_old_read) 
-				rc = SMBLegacyRead(xid, pTcon,
-					 open_file->netfid,
-					 current_read_size, *poffset,
-					 &bytes_read, &current_offset);
-			else {
-				rc = CIFSSMBRead(xid, pTcon,
+			rc = CIFSSMBRead(xid, pTcon,
 					open_file->netfid,
 					current_read_size, *poffset,
 					&bytes_read, &current_offset);
-				/* check if server disavows support for
-				   64 bit offsets */
-				if(rc == -EINVAL) {
-					rc = -EAGAIN;
-					use_old_read = TRUE;
-					continue;
-				}
-			}
 		}
 		if (rc || (bytes_read == 0)) {
 			if (total_read) {
@@ -1423,7 +1388,6 @@
 	struct smb_com_read_rsp *pSMBr;
 	struct pagevec lru_pvec;
 	struct cifsFileInfo *open_file;
-	int use_old_read = FALSE;
 
 	xid = GetXid();
 	if (file->private_data == NULL) {
@@ -1433,9 +1397,7 @@
 	open_file = (struct cifsFileInfo *)file->private_data;
 	cifs_sb = CIFS_SB(file->f_dentry->d_sb);
 	pTcon = cifs_sb->tcon;
-	if(pTcon->ses)
-		if((pTcon->ses->capabilities & CAP_LARGE_FILES) == 0)
-			use_old_read = TRUE;
+
 	pagevec_init(&lru_pvec, 0);
 
 	for (i = 0; i < num_pages; ) {
@@ -1481,22 +1443,10 @@
 					break;
 			}
 
-			if(use_old_read)
-				rc = SMBLegacyRead(xid, pTcon,
+			rc = CIFSSMBRead(xid, pTcon,
 					open_file->netfid,
 					read_size, offset,
 					&bytes_read, &smb_read_data);
-			else {
-				rc = CIFSSMBRead(xid, pTcon,
-					open_file->netfid,
-					read_size, offset,
-					&bytes_read, &smb_read_data);
-				if(rc == -EINVAL) {
-					use_old_read = TRUE;
-					rc = -EAGAIN;
-					continue;
-				}
-			}
 
 			/* BB more RC checks ? */
 			if (rc== -EAGAIN) {
