Skip to content

Commit

Permalink
cifs: remove bogus remapping of error in cifs_filldir()
Browse files Browse the repository at this point in the history
As the FIXME points out correctly, now filldir() itself returns -EOVERFLOW if
it not possible to represent the inode number supplied by the filesystem in
the field provided by userspace.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Suresh Jayaraman authored and Steve French committed Dec 8, 2010
1 parent 7d161b7 commit 545c988
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions fs/cifs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,18 +759,6 @@ static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir,
rc = filldir(direntry, qstring.name, qstring.len, file->f_pos,
ino, fattr.cf_dtype);

/*
* 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
*
* FIXME: This looks bogus. filldir returns -EOVERFLOW in the above
* case already. Why should we be clobbering other errors from it?
*/
if (rc) {
cFYI(1, "filldir rc = %d", rc);
rc = -EOVERFLOW;
}
dput(tmp_dentry);
return rc;
}
Expand Down

0 comments on commit 545c988

Please sign in to comment.