summaryrefslogtreecommitdiff
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-11-02 17:22:24 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-02 17:22:24 -0800
commit0b0e0b5f1a22c20c0f127fb9b457136d6c3ca8ed (patch)
tree0b0200a5f5fbfc9da8ce34230b19c625135d27a4 /fs/cifs/readdir.c
parent895663cd92574367054e0eb604a7428852f359b8 (diff)
parent8e87d4dc159148f04f515bc072df22a2c089e7f2 (diff)
downloadlwn-0b0e0b5f1a22c20c0f127fb9b457136d6c3ca8ed.tar.gz
lwn-0b0e0b5f1a22c20c0f127fb9b457136d6c3ca8ed.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] report rename failure when target file is locked by Windows [CIFS] Allow null user connections [CIFS] Fix readdir breakage when blocksize set too small
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index b5b0a2a41bef..ed18c3965f7b 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -896,6 +896,10 @@ static int cifs_filldir(char *pfindEntry, struct file *file,
tmp_inode->i_ino,obj_type);
if(rc) {
cFYI(1,("filldir rc = %d",rc));
+ /* we can not return filldir errors to the caller
+ since they are "normal" when the stat blocksize
+ is too small - we return remapped error instead */
+ rc = -EOVERFLOW;
}
dput(tmp_dentry);
@@ -1074,6 +1078,11 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
we want to check for that here? */
rc = cifs_filldir(current_entry, file,
filldir, direntry, tmp_buf, max_len);
+ if(rc == -EOVERFLOW) {
+ rc = 0;
+ break;
+ }
+
file->f_pos++;
if(file->f_pos ==
cifsFile->srch_inf.index_of_last_entry) {