@@ -773,6 +773,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
char *tmp_buf = NULL;
char *end_of_smb;
unsigned int max_len;
+ int err;
xid = GetXid();
@@ -783,17 +784,31 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
switch ((int) file->f_pos) {
case 0:
- if (filldir(direntry, ".", 1, file->f_pos,
- file->f_path.dentry->d_inode->i_ino, DT_DIR) < 0) {
+ err = filldir(direntry, ".", 1, file->f_pos,
+ file->f_path.dentry->d_inode->i_ino, DT_DIR);
+ if (err < 0) {
cERROR(1, "Filldir for current dir failed");
+ if (err == -EOVERFLOW) {
+ cERROR(1, "Server inodes are too large for 32 "
+ "bit userspace. You might "
+ "consider using 'noserverino' "
+ "mount option for this mount.");
+ }
rc = -ENOMEM;
break;
}
file->f_pos++;
case 1:
- if (filldir(direntry, "..", 2, file->f_pos,
- file->f_path.dentry->d_parent->d_inode->i_ino, DT_DIR) < 0) {
+ err = filldir(direntry, "..", 2, file->f_pos,
+ file->f_path.dentry->d_parent->d_inode->i_ino, DT_DIR);
+ if (err < 0) {
cERROR(1, "Filldir for parent dir failed");
+ if (err == -EOVERFLOW) {
+ cERROR(1, "Server inodes are too large for 32 "
+ "bit userspace. You might "
+ "consider using 'noserverino' "
+ "mount option for this mount.");
+ }
rc = -ENOMEM;
break;
}