1 From: Tao Ma <tao.ma@oracle.com>
2 Date: Fri, 24 Oct 2008 07:57:28 +0800
3 Subject: ocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c.
5 On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM),
6 so we should check whether handle is NULL. Fix them to use IS_ERR().
7 Jan has made the patch for other part in ocfs2(thank Jan for it), so
8 this is just the fix for fs/ocfs2/xattr.c.
10 Signed-off-by: Tao Ma <tao.ma@oracle.com>
11 Cc: Jan Kara <jack@suse.cz>
12 Signed-off-by: Joel Becker <joel.becker@oracle.com>
13 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 fs/ocfs2/xattr.c | 4 ++--
16 1 files changed, 2 insertions(+), 2 deletions(-)
18 Index: linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
19 ===================================================================
20 --- linux-2.6.27-ocfs2.orig/fs/ocfs2/xattr.c
21 +++ linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
22 @@ -4092,7 +4092,7 @@ static int ocfs2_xattr_value_update_size
23 handle_t *handle = NULL;
25 handle = ocfs2_start_trans(osb, 1);
26 - if (handle == NULL) {
27 + if (IS_ERR(handle)) {
31 @@ -4259,7 +4259,7 @@ static int ocfs2_rm_xattr_cluster(struct
34 handle = ocfs2_start_trans(osb, OCFS2_REMOVE_EXTENT_CREDITS);
35 - if (handle == NULL) {
36 + if (IS_ERR(handle)) {