cifs: remove bogus remapping of error in cifs_filldir()
Subsystems (2)
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
@@ -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
Jeff Layton
Reviewed-byQuoted 22 lines · On Mon, 6 Dec 2010 13:45:50 +0530 Suresh Jayaraman…
As the FIXME points out correctly, now
filldir()itself returns-EOVERFLOWif it not possible to represent the inode number supplied by the filesystem in the field provided by userspace.Signed-off-by Suresh Jayaraman <[email protected]>--- fs/cifs/readdir.c | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-)fs/cifs/readdir.c +0
-5@@ -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...
Quoted 23 lines · Suresh Jayaraman
As the FIXME points out correctly, now
filldir()itself returns-EOVERFLOWif it not possible to represent the inode number supplied by the filesystem in the field provided by userspace.Signed-off-by Suresh Jayaraman <[email protected]>---
fs/cifs/readdir.c | 12 ------------1 files changed, 0 insertions(+), 12 deletions(-)fs/cifs/readdir.c +0
-5@@ -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
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-EOVERFLOWif it not possible to represent the inode number supplied by the filesystem in the field provided by userspace.Signed-off-by Suresh Jayaraman <[email protected]>---
fs/cifs/readdir.c | 12 ------------1 files changed, 0 insertions(+), 12 deletions(-)fs/cifs/readdir.c +0
-9@@ -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
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-EOVERFLOWif it not possible to represent the inode number supplied by the filesystem in the field provided by userspace.Signed-off-by Suresh Jayaraman <[email protected]>---
fs/cifs/readdir.c | 12 ------------1 files changed, 0 insertions(+), 12 deletions(-)fs/cifs/readdir.c +0
-9@@ -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