diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-10-21 05:32:48 +0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-11-10 20:51:46 +0300 |
commit | eb6ff2397d1fdfc6a7629c99896338e5b5c508e5 (patch) | |
tree | 86f10d7f9a87f508db26c9b780f6ed8635c8c8fd /fs/ocfs2 | |
parent | bd60bd37ade4321ecce4ed4442f68c88febd76d5 (diff) | |
download | linux-eb6ff2397d1fdfc6a7629c99896338e5b5c508e5.tar.xz |
ocfs2: Specify appropriate journal access for new xattr buckets.
There are a couple places that get an xattr bucket that may be reading
an existing one or may be allocating a new one. They should specify the
correct journal access mode depending.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/xattr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 92df88a41e5d..fb450200bc88 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -3231,7 +3231,9 @@ static int ocfs2_half_xattr_bucket(struct inode *inode, for (i = 0; i < blk_per_bucket; i++) { ret = ocfs2_journal_access(handle, inode, t_bhs[i], - OCFS2_JOURNAL_ACCESS_CREATE); + new_bucket_head ? + OCFS2_JOURNAL_ACCESS_CREATE : + OCFS2_JOURNAL_ACCESS_WRITE); if (ret) { mlog_errno(ret); goto out; @@ -3393,6 +3395,8 @@ static int ocfs2_cp_xattr_bucket(struct inode *inode, for (i = 0; i < blk_per_bucket; i++) { ret = ocfs2_journal_access(handle, inode, t_bhs[i], + t_is_new ? + OCFS2_JOURNAL_ACCESS_CREATE : OCFS2_JOURNAL_ACCESS_WRITE); if (ret) goto out; |