projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa38e92
)
ocfs2: Fix checking of return value of new_inode()
author
Jan Kara
<jack@suse.cz>
Mon, 20 Oct 2008 17:23:53 +0000
(19:23 +0200)
committer
Mark Fasheh
<mfasheh@suse.com>
Mon, 10 Nov 2008 17:51:46 +0000
(09:51 -0800)
new_inode() does not return ERR_PTR() but NULL in case of failure. Correct
checking of the return value.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/ocfs2/namei.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ocfs2/namei.c
b/fs/ocfs2/namei.c
index 485a6aa0ad39060e9eb27f2897be98026b886d4c..f594f300d4cd0ba80caae9b493cf4735ae4f51ce 100644
(file)
--- a/
fs/ocfs2/namei.c
+++ b/
fs/ocfs2/namei.c
@@
-378,8
+378,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;
}