Skip to contentSkip to conversation

jfs: 0 is not valid errno value

PATCH In review Marcin Slusarz 2 participants 2 messages May 11, 2008 – May 12, 2008 JFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jfs: 0 is not valid errno value

... so return NULL from jfs_lookup

---
is it ok to return NULL from this function?
compile tested only

---
 fs/jfs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/jfs/namei.c +1 -1
@@ -1455,7 +1455,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
 		free_UCSname(&key);
 		if (rc == -ENOENT) {
 			d_add(dentry, NULL);
-			return ERR_PTR(0);
+			return NULL;
 		} else if (rc) {
 			jfs_err("jfs_lookup: dtSearch returned %d", rc);
 			return ERR_PTR(rc);
#1 lore raw
Quoted 3 lines · Marcin Slusarz

... so return NULL from jfs_lookup

Quoted 5 lines

---
is it ok to return NULL from this function?
compile tested only

Yeah. I'm not sure how ERR_PTR(0) got in there in the first place. It's been that way for quite a while.

I'll add it to the jfs git tree.

Thanks,
Shaggy

Quoted 16 lines
---
 fs/jfs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/jfs/namei.c +1 -1
@@ -1455,7 +1455,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc
 		free_UCSname(&key);
 		if (rc == -ENOENT) {
 			d_add(dentry, NULL);
-			return ERR_PTR(0);
+			return NULL;
 		} else if (rc) {
 			jfs_err("jfs_lookup: dtSearch returned %d", rc);
 			return ERR_PTR(rc);
Signature · 2 lines
David Kleikamp
IBM Linux Technology Center