Skip to contentSkip to conversation

ocfs2: ocfs2_dir_foreach returns the error turned by filldir

PATCH New Wengang Wang 2 participants 3 messages Jul 29, 2011 – Aug 22, 2011 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 ocfs2: ocfs2_dir_foreach returns the error turned by filldir

try to return the error turned by filldir in ocfs2_dir_foreach.

---
 fs/ocfs2/dir.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/ocfs2/dir.c +3 -1
index 3302088..4b365a1 100644
@@ -2004,8 +2004,10 @@ int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv,
 
 	if (ret > 0)
 		ret = -EIO;
+	if (!ret)
+		ret = filldir_err;
 
-	return 0;
+	return ret;
 }
 
 /*
Signature · 1 line
1.7.5.2
maintainer
#1 lore raw

PATCH 2/4 ocfs2: ocfs2_dir_foreach returns the error turned by filldir

Quoted 3 lines · Wengang Wang

try to return the error turned by filldir in ocfs2_dir_foreach.

NAK. No one returns it. The wrapper vfs_readdir pulls
buf->error out just like you were trying to in this patch.

Joel

Quoted 28 lines
---
 fs/ocfs2/dir.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/ocfs2/dir.c +3 -1
index 3302088..4b365a1 100644
@@ -2004,8 +2004,10 @@ int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv,
 
 	if (ret > 0)
 		ret = -EIO;
+	if (!ret)
+		ret = filldir_err;
 
-	return 0;
+	return ret;
 }
 
 /*
Signature · 7 lines
1.7.5.2


_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 6 lines
"Ninety feet between bases is perhaps as close as man has ever come
 to perfection."
	- Red Smith

			http://www.jlbec.org/
			jlbec at evilplan.org
maintainer
#2 lore raw

PATCH 2/4 ocfs2: ocfs2_dir_foreach returns the error turned by filldir

Quoted 7 lines · Joel Becker
Quoted 3 lines · Wengang Wang

try to return the error turned by filldir in ocfs2_dir_foreach.

NAK. No one returns it. The wrapper vfs_readdir pulls
buf->error out just like you were trying to in this patch.

Sorry, it's in getdents64(), but the point holds.

Joel

Quoted 45 lines

Joel

Quoted 28 lines
---
 fs/ocfs2/dir.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/ocfs2/dir.c +3 -1
index 3302088..4b365a1 100644
@@ -2004,8 +2004,10 @@ int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv,
 
 	if (ret > 0)
 		ret = -EIO;
+	if (!ret)
+		ret = filldir_err;
 
-	return 0;
+	return ret;
 }
 
 /*
Signature · 7 lines
1.7.5.2


_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 11 lines
"Ninety feet between bases is perhaps as close as man has ever come
 to perfection."
	- Red Smith

			http://www.jlbec.org/
			jlbec at evilplan.org

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 6 lines
"You can get more with a kind word and a gun than you can with
 a kind word alone."
         - Al Capone

			http://www.jlbec.org/
			jlbec at evilplan.org