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.

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>
This commit is contained in:
Jan Kara 2008-10-20 19:23:53 +02:00 committed by Mark Fasheh
parent fa38e92cb3
commit 87cfa00432
1 changed files with 2 additions and 2 deletions

View File

@ -378,8 +378,8 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
} }
inode = new_inode(dir->i_sb); inode = new_inode(dir->i_sb);
if (IS_ERR(inode)) { if (!inode) {
status = PTR_ERR(inode); status = -ENOMEM;
mlog(ML_ERROR, "new_inode failed!\n"); mlog(ML_ERROR, "new_inode failed!\n");
goto leave; goto leave;
} }