ocfs2: Fix checking of return value of new_inode()
PATCH 1/1 ocfs2: Fix checking of return value of new_inode()
new_inode() does not return ERR_PTR() but NULL in case of failure. Correct checking of the return value.
--- fs/ocfs2/namei.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/ocfs2/namei.c +2 -2
@@ -382,8 +382,8 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb, } inode =new_inode (dir->i_sb); -if (IS_ERR (inode)) { - status =PTR_ERR (inode); +if (!inode) { + status = -ENOMEM ;mlog (ML_ERROR ,"new_inode failed!\n" ); goto leave; }
Signature · 1 line
1.5.2.4
PATCH 1/1 ocfs2: Fix checking of return value of new_inode()
Quoted 4 lines · Jan Kara
new_inode()does not returnERR_PTR()but NULL in case of failure. Correct checking of the return value.Signed-off-by Jan Kara <[email protected]>
Another upstream candidate.
Quoted 27 lines
--- fs/ocfs2/namei.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)fs/ocfs2/namei.c +2
-2@@ -382,8 +382,8 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb, } inode =new_inode (dir->i_sb); -if (IS_ERR (inode)) { - status =PTR_ERR (inode); +if (!inode) { + status = -ENOMEM ;mlog (ML_ERROR ,"new_inode failed!\n" ); goto leave; }Signature · 7 lines
1.5.2.4 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel at oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 8 lines
"Well-timed silence hath more eloquence than speech."
- Martin Fraquhar Tupper
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 1/1 ocfs2: Fix checking of return value of new_inode()
Quoted 8 lines · Joel Becker
Quoted 4 lines · Jan Kara
new_inode()does not returnERR_PTR()but NULL in case of failure. Correct checking of the return value.Signed-off-by Jan Kara <[email protected]>Signed-off-by Joel Becker <[email protected]>Another upstream candidate.
Yep. Mark, will you pick it up or should I send you the patch directly?
Honza
Quoted 39 lines
Quoted 28 lines
--- fs/ocfs2/namei.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)fs/ocfs2/namei.c +2
-2@@ -382,8 +382,8 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb, } inode =new_inode (dir->i_sb); -if (IS_ERR (inode)) { - status =PTR_ERR (inode); +if (!inode) { + status = -ENOMEM ;mlog (ML_ERROR ,"new_inode failed!\n" ); goto leave; }Signature · 7 lines
1.5.2.4 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel at oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-develSignature · 8 lines
"Well-timed silence hath more eloquence than speech." - Martin Fraquhar Tupper Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
PATCH 1/1 ocfs2: Fix checking of return value of new_inode()
In reply to Joel BeckerQuoted 8 lines · Joel Becker
Quoted 4 lines · Jan Kara
new_inode()does not returnERR_PTR()but NULL in case of failure. Correct checking of the return value.Signed-off-by Jan Kara <[email protected]>Signed-off-by Joel Becker <[email protected]>Another upstream candidate.
This is now in my xattr-28 branch.
Joel
Signature · 9 lines
Life's Little Instruction Book #139 "Never deprive someone of hope; it might be all they have." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127