All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/1] ocfs2/xattr: Fix check of return value of ocfs2_start_trans().
@ 2008-10-23 23:57 Tao Ma
  2008-10-24 21:40 ` Joel Becker
  0 siblings, 1 reply; 2+ messages in thread
From: Tao Ma @ 2008-10-23 23:57 UTC (permalink / raw)
  To: ocfs2-devel

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 <tao.ma@oracle.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Joel Becker <joel.becker@oracle.com>
---
 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 789fb70..a371c01 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;
-- 
1.5.4.GIT

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] ocfs2/xattr: Fix check of return value of ocfs2_start_trans().
  2008-10-23 23:57 [Ocfs2-devel] [PATCH 1/1] ocfs2/xattr: Fix check of return value of ocfs2_start_trans() Tao Ma
@ 2008-10-24 21:40 ` Joel Becker
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2008-10-24 21:40 UTC (permalink / raw)
  To: ocfs2-devel

On Fri, Oct 24, 2008 at 07:57:28AM +0800, Tao Ma wrote:
> Hi Joel,
> 	this should be in your xattr-28 branch I think.

	Agreed.  This is now in my xattr-28 branch.

Joel

-- 

"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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-24 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23 23:57 [Ocfs2-devel] [PATCH 1/1] ocfs2/xattr: Fix check of return value of ocfs2_start_trans() Tao Ma
2008-10-24 21:40 ` Joel Becker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.