1 From: Joel Becker <joel.becker@oracle.com>
2 Date: Mon, 20 Oct 2008 18:32:48 -0700
3 Subject: ocfs2: Specify appropriate journal access for new xattr buckets.
5 There are a couple places that get an xattr bucket that may be reading
6 an existing one or may be allocating a new one. They should specify the
7 correct journal access mode depending.
9 Signed-off-by: Joel Becker <joel.becker@oracle.com>
10 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12 fs/ocfs2/xattr.c | 6 +++++-
13 1 files changed, 5 insertions(+), 1 deletions(-)
15 Index: linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
16 ===================================================================
17 --- linux-2.6.27-ocfs2.orig/fs/ocfs2/xattr.c
18 +++ linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
19 @@ -3231,7 +3231,9 @@ static int ocfs2_half_xattr_bucket(struc
21 for (i = 0; i < blk_per_bucket; i++) {
22 ret = ocfs2_journal_access(handle, inode, t_bhs[i],
23 - OCFS2_JOURNAL_ACCESS_CREATE);
25 + OCFS2_JOURNAL_ACCESS_CREATE :
26 + OCFS2_JOURNAL_ACCESS_WRITE);
30 @@ -3393,6 +3395,8 @@ static int ocfs2_cp_xattr_bucket(struct
32 for (i = 0; i < blk_per_bucket; i++) {
33 ret = ocfs2_journal_access(handle, inode, t_bhs[i],
35 + OCFS2_JOURNAL_ACCESS_CREATE :
36 OCFS2_JOURNAL_ACCESS_WRITE);