summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-10-30 21:42:57 +0000
committerSteve French <sfrench@us.ibm.com>2006-10-30 21:42:57 +0000
commit7ca85ba752e521f1b5ead1f3b91c562cc3910c7b (patch)
treed8f0907b292a279005e28253cf30a78673e92b3d /fs/cifs
parentc1b707d253fe918b92882cff1dbd926b47e14fd2 (diff)
downloadlinux-7ca85ba752e521f1b5ead1f3b91c562cc3910c7b.tar.gz
linux-7ca85ba752e521f1b5ead1f3b91c562cc3910c7b.tar.bz2
linux-7ca85ba752e521f1b5ead1f3b91c562cc3910c7b.zip
[CIFS] Fix readdir breakage when blocksize set too small
Do not treat filldir running out of space as an error that needs to be returned. Fixes Redhat bugzilla bug # 211070 Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-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) {