1 From: Jan Kara <jack@suse.cz>
2 Date: Mon, 20 Oct 2008 19:23:53 +0200
3 Subject: ocfs2: Fix checking of return value of new_inode()
5 new_inode() does not return ERR_PTR() but NULL in case of failure. Correct
6 checking of the return value.
8 Signed-off-by: Jan Kara <jack@suse.cz>
9 Signed-off-by: Joel Becker <joel.becker@oracle.com>
10 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12 fs/ocfs2/namei.c | 4 ++--
13 1 files changed, 2 insertions(+), 2 deletions(-)
15 Index: linux-2.6.27-ocfs2/fs/ocfs2/namei.c
16 ===================================================================
17 --- linux-2.6.27-ocfs2.orig/fs/ocfs2/namei.c
18 +++ linux-2.6.27-ocfs2/fs/ocfs2/namei.c
19 @@ -378,8 +378,8 @@ static int ocfs2_mknod_locked(struct ocf
22 inode = new_inode(dir->i_sb);
23 - if (IS_ERR(inode)) {
24 - status = PTR_ERR(inode);
27 mlog(ML_ERROR, "new_inode failed!\n");