jfs: 0 is not valid errno value
PATCH 1/1 jfs: 0 is not valid errno value
... so return NULL from jfs_lookup
Signed-off-by Marcin Slusarz <[email protected]>
Cc Dave Kleikamp <[email protected]>
Cc Alexander Viro <[email protected]>
---
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, strucfree_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);
Quoted 3 lines · Marcin Slusarz
... so return NULL from
jfs_lookupSigned-off-by Marcin Slusarz <[email protected]>
Signed-off-by Dave Kleikamp <[email protected]>
Quoted 5 lines
Cc Alexander Viro <[email protected]>---
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, strucfree_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