ocfs2/xattr: Fix check of return value of ocfs2_start_trans().
PATCH 1/1 ocfs2/xattr: Fix check of return value of ocfs2_start_trans().
Hi Joel,
this should be in your xattr-28 branch I think.
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 <[email protected]>
Cc Jan Kara <[email protected]>
Cc Joel Becker <[email protected]>
--- fs/ocfs2/xattr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/ocfs2/xattr.c +2 -2
@@ -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;
Signature · 1 line
1.5.4.GIT
PATCH 1/1 ocfs2/xattr: Fix check of return value of ocfs2_start_trans().
Quoted 2 lines · Tao Ma
Hi Joel,
this should be in your xattr-28 branch I think.
Agreed. This is now in my xattr-28 branch.
Joel
Signature · 8 lines
"Here's a nickle -- get yourself a better X server." - Keith Packard Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127