Skip to contentSkip to conversation

cifs: remove bogus remapping of error in cifs_filldir()

PATCH In review Suresh Jayaraman 5 participants 5 messages Dec 6, 2010 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: remove bogus remapping of error in cifs_filldir()

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.

---
 fs/cifs/readdir.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
fs/cifs/readdir.c +0 -12
index 32d300e..a73eb9f 100644
@@ -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;
 }

A message that is not in the archive (sent off-list or not yet received): 1291623350-11347-1-git-send-email-sjayaraman-l3A5Bk7waGM@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 22 lines · On Mon, 6 Dec 2010 13:45:50 +0530 Suresh Jayaraman…

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.

---
 fs/cifs/readdir.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
fs/cifs/readdir.c +0 -5
index 32d300e..a73eb9f 100644
@@ -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
-	 *

fs/cifs/readdir.c static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, · line 764

Quoted 10 lines
fs/cifs/readdir.c +0 -7
-	 * 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;
 }

I meant to do that a while ago...

#3 lore raw
In reply to a message not in the archive
Quoted 23 lines · Suresh Jayaraman

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.

---
 fs/cifs/readdir.c |   12 ------------

 1 files changed, 0 insertions(+), 12 deletions(-)
fs/cifs/readdir.c +0 -5
index 32d300e..a73eb9f 100644
@@ -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
-        *

fs/cifs/readdir.c static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, · line 764

Quoted 10 lines
fs/cifs/readdir.c +0 -7
-        * 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;
  }

Makes sense - Any objections to pushing this upstream now.

--
Thanks,

Steve

A message that is not in the archive (sent off-list or not yet received): AANLkTimT4HbYuaFUTtQup9PNka6XQzBoXmZytYjSk2Hj-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#5 lore raw
Quoted 28 lines · On Mon, 6 Dec 2010 10:26:08 -0600 Steve French…
Quoted 27 lines · Suresh Jayaraman

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.

---
 fs/cifs/readdir.c |   12 ------------

 1 files changed, 0 insertions(+), 12 deletions(-)
fs/cifs/readdir.c +0 -9
index 32d300e..a73eb9f 100644
@@ -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) {
Quoted 9 lines

fs/cifs/readdir.c static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, · line 764

Quoted 6 lines
fs/cifs/readdir.c +0 -3
-               cFYI(1, "filldir rc = %d", rc);
-               rc = -EOVERFLOW;
-       }
        dput(tmp_dentry);
        return rc;
  }

Makes sense - Any objections to pushing this upstream now.

No objection, but if you're going to take this, then please also take the three patches I sent on 11/22.

Signature · 1 line
Jeff Layton <[email protected]>

A message that is not in the archive (sent off-list or not yet received): 20101206124823.33522ed9-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org

#7 lore raw
Quoted 41 lines · Jeff Layton
Quoted 28 lines · On Mon, 6 Dec 2010 10:26:08 -0600 Steve French…
Quoted 27 lines · Suresh Jayaraman

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.

---
 fs/cifs/readdir.c |   12 ------------

 1 files changed, 0 insertions(+), 12 deletions(-)
fs/cifs/readdir.c +0 -9
index 32d300e..a73eb9f 100644
@@ -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) {
Quoted 9 lines

fs/cifs/readdir.c static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, · line 764

Quoted 6 lines
fs/cifs/readdir.c +0 -3
-               cFYI(1, "filldir rc = %d", rc);
-               rc = -EOVERFLOW;
-       }
        dput(tmp_dentry);
        return rc;
  }

Makes sense - Any objections to pushing this upstream now.

Quoted 2 lines

No objection, but if you're going to take this, then please also take the three patches I sent on 11/22.

(and perhaps the fourth one, the RFC1001 name clean-up patch also?)

Quoted 8 lines

--
Jeff Layton <[email protected]> --
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html