]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
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. | |
4 | ||
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. | |
8 | ||
9 | Signed-off-by: Joel Becker <joel.becker@oracle.com> | |
10 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
11 | --- | |
12 | fs/ocfs2/xattr.c | 6 +++++- | |
13 | 1 files changed, 5 insertions(+), 1 deletions(-) | |
14 | ||
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 | |
20 | ||
21 | for (i = 0; i < blk_per_bucket; i++) { | |
22 | ret = ocfs2_journal_access(handle, inode, t_bhs[i], | |
23 | - OCFS2_JOURNAL_ACCESS_CREATE); | |
24 | + new_bucket_head ? | |
25 | + OCFS2_JOURNAL_ACCESS_CREATE : | |
26 | + OCFS2_JOURNAL_ACCESS_WRITE); | |
27 | if (ret) { | |
28 | mlog_errno(ret); | |
29 | goto out; | |
30 | @@ -3393,6 +3395,8 @@ static int ocfs2_cp_xattr_bucket(struct | |
31 | ||
32 | for (i = 0; i < blk_per_bucket; i++) { | |
33 | ret = ocfs2_journal_access(handle, inode, t_bhs[i], | |
34 | + t_is_new ? | |
35 | + OCFS2_JOURNAL_ACCESS_CREATE : | |
36 | OCFS2_JOURNAL_ACCESS_WRITE); | |
37 | if (ret) | |
38 | goto out; |