]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-more_start_tran_fixes.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-more_start_tran_fixes.patch
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.
4
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.
9
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>
14 ---
15 fs/ocfs2/xattr.c | 4 ++--
16 1 files changed, 2 insertions(+), 2 deletions(-)
17
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;
24
25 handle = ocfs2_start_trans(osb, 1);
26 - if (handle == NULL) {
27 + if (IS_ERR(handle)) {
28 ret = -ENOMEM;
29 mlog_errno(ret);
30 goto out;
31 @@ -4259,7 +4259,7 @@ static int ocfs2_rm_xattr_cluster(struct
32 }
33
34 handle = ocfs2_start_trans(osb, OCFS2_REMOVE_EXTENT_CREDITS);
35 - if (handle == NULL) {
36 + if (IS_ERR(handle)) {
37 ret = -ENOMEM;
38 mlog_errno(ret);
39 goto out;