diff options
author | Tao Ma <tao.ma@oracle.com> | 2008-10-24 07:57:28 +0800 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-11-10 09:51:47 -0800 |
commit | d32647993c211901fc4819ef3327f62d1859241b (patch) | |
tree | 54178f5bdb8c654b917aedc08a8284c2596391ea /fs/ocfs2 | |
parent | b99835c1684918b9975851d71455c5c007d1715b (diff) | |
download | linux-d32647993c211901fc4819ef3327f62d1859241b.tar.gz linux-d32647993c211901fc4819ef3327f62d1859241b.tar.bz2 linux-d32647993c211901fc4819ef3327f62d1859241b.zip |
ocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c.
On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM),
so we should check whether handle is NULL. Fix them to use IS_ERR().
Jan has made the patch for other part in ocfs2(thank Jan for it), so
this is just the fix for fs/ocfs2/xattr.c.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Cc: 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/xattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 789fb70462c9..a371c01942b1 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -4092,7 +4092,7 @@ static int ocfs2_xattr_value_update_size(struct inode *inode, handle_t *handle = NULL; handle = ocfs2_start_trans(osb, 1); - if (handle == NULL) { + if (IS_ERR(handle)) { ret = -ENOMEM; mlog_errno(ret); goto out; @@ -4259,7 +4259,7 @@ static int ocfs2_rm_xattr_cluster(struct inode *inode, } handle = ocfs2_start_trans(osb, OCFS2_REMOVE_EXTENT_CREDITS); - if (handle == NULL) { + if (IS_ERR(handle)) { ret = -ENOMEM; mlog_errno(ret); goto out; |