aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-08-18 23:49:57 -0400
committerSteve French <sfrench@us.ibm.com>2005-08-18 23:49:57 -0400
commitc46fa8acdc533e8084359ea11c79d56eb98313fb (patch)
treed9455c92f58c99e342856995668739236bdd09e3 /fs/cifs/readdir.c
parent8d0d50948b276b46b75b1b5855d3f9fab1e0fd92 (diff)
[CIFS] Add mount option for disabling sending byte range lock requests
over the wire (to help the case when applications break with cifs mandatory lock behavior. Add part one of mount option for requesting case insensitive path name matching. Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index dec3c9dd04d7..ef5eb804ce82 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -194,6 +194,8 @@ static void fill_in_inode(struct inode *tmp_inode,
194 tmp_inode->i_fop = &cifs_file_direct_ops; 194 tmp_inode->i_fop = &cifs_file_direct_ops;
195 else 195 else
196 tmp_inode->i_fop = &cifs_file_ops; 196 tmp_inode->i_fop = &cifs_file_ops;
197 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
198 tmp_inode->i_fop->lock = NULL;
197 tmp_inode->i_data.a_ops = &cifs_addr_ops; 199 tmp_inode->i_data.a_ops = &cifs_addr_ops;
198 200
199 if(isNewInode) 201 if(isNewInode)
@@ -298,6 +300,8 @@ static void unix_fill_in_inode(struct inode *tmp_inode,
298 tmp_inode->i_fop = &cifs_file_direct_ops; 300 tmp_inode->i_fop = &cifs_file_direct_ops;
299 else 301 else
300 tmp_inode->i_fop = &cifs_file_ops; 302 tmp_inode->i_fop = &cifs_file_ops;
303 if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
304 tmp_inode->i_fop->lock = NULL;
301 tmp_inode->i_data.a_ops = &cifs_addr_ops; 305 tmp_inode->i_data.a_ops = &cifs_addr_ops;
302 306
303 if(isNewInode) 307 if(isNewInode)
@@ -557,7 +561,6 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
557 char * end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + 561 char * end_of_smb = cifsFile->srch_inf.ntwrk_buf_start +
558 smbCalcSize((struct smb_hdr *) 562 smbCalcSize((struct smb_hdr *)
559 cifsFile->srch_inf.ntwrk_buf_start); 563 cifsFile->srch_inf.ntwrk_buf_start);
560/* dump_cifs_file_struct(file,"found entry in fce "); */
561 first_entry_in_buffer = cifsFile->srch_inf.index_of_last_entry 564 first_entry_in_buffer = cifsFile->srch_inf.index_of_last_entry
562 - cifsFile->srch_inf.entries_in_buffer; 565 - cifsFile->srch_inf.entries_in_buffer;
563 pos_in_buf = index_to_find - first_entry_in_buffer; 566 pos_in_buf = index_to_find - first_entry_in_buffer;
@@ -595,7 +598,6 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
595 *num_to_ret = 0; 598 *num_to_ret = 0;
596 } else 599 } else
597 *num_to_ret = cifsFile->srch_inf.entries_in_buffer - pos_in_buf; 600 *num_to_ret = cifsFile->srch_inf.entries_in_buffer - pos_in_buf;
598/* dump_cifs_file_struct(file, "end fce ");*/
599 601
600 return rc; 602 return rc;
601} 603}
@@ -815,14 +817,12 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
815 FreeXid(xid); 817 FreeXid(xid);
816 return -EIO; 818 return -EIO;
817 } 819 }
818/* dump_cifs_file_struct(file, "Begin rdir "); */
819 820
820 cifs_sb = CIFS_SB(file->f_dentry->d_sb); 821 cifs_sb = CIFS_SB(file->f_dentry->d_sb);
821 pTcon = cifs_sb->tcon; 822 pTcon = cifs_sb->tcon;
822 if(pTcon == NULL) 823 if(pTcon == NULL)
823 return -EINVAL; 824 return -EINVAL;
824 825
825/* cFYI(1,("readdir2 pos: %lld",file->f_pos)); */
826 826
827 switch ((int) file->f_pos) { 827 switch ((int) file->f_pos) {
828 case 0: 828 case 0:
@@ -876,7 +876,6 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
876 cifsFile->search_resume_name = NULL; */ 876 cifsFile->search_resume_name = NULL; */
877 877
878 /* BB account for . and .. in f_pos as special case */ 878 /* BB account for . and .. in f_pos as special case */
879 /* dump_cifs_file_struct(file, "rdir after default ");*/
880 879
881 rc = find_cifs_entry(xid,pTcon, file, 880 rc = find_cifs_entry(xid,pTcon, file,
882 &current_entry,&num_to_fill); 881 &current_entry,&num_to_fill);
@@ -924,7 +923,6 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
924 } /* end switch */ 923 } /* end switch */
925 924
926rddir2_exit: 925rddir2_exit:
927 /* dump_cifs_file_struct(file, "end rdir "); */
928 FreeXid(xid); 926 FreeXid(xid);
929 return rc; 927 return rc;
930} 928}