diff options
author | Jan Kara <jack@suse.cz> | 2008-10-20 19:23:53 +0200 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-11-10 09:51:46 -0800 |
commit | 87cfa004321c62aec681713ea48e0b846336d9f4 (patch) | |
tree | 6ce76f2d2d97d8e9edf100d4c8561b8dcde338d4 /fs/ocfs2 | |
parent | fa38e92cb34e27e60d0faf1035934eb9b44aa1d4 (diff) | |
download | kernel_samsung_crespo-87cfa004321c62aec681713ea48e0b846336d9f4.zip kernel_samsung_crespo-87cfa004321c62aec681713ea48e0b846336d9f4.tar.gz kernel_samsung_crespo-87cfa004321c62aec681713ea48e0b846336d9f4.tar.bz2 |
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>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 485a6aa..f594f30 100644 --- 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; } |