1 From 20ee86b5d0f26117b102012fd33eb05048f0a583 Mon Sep 17 00:00:00 2001
2 From: Jan Kara <jack@suse.cz>
3 Date: Wed, 17 Jun 2009 19:04:54 +0200
4 Subject: [PATCH 2/6] ocfs2: Mark buffer uptodate before calling ocfs2_journal_access()
6 In a code path extending local quota files we marked new header
7 buffer uptodate only after calling ocfs2_journal_access() which
8 triggers a bug. Fix it and also call ocfs2 variant of the function
9 marking buffer uptodate.
11 Signed-off-by: Jan Kara <jack@suse.cz>
13 fs/ocfs2/quota_local.c | 4 +++-
14 1 files changed, 3 insertions(+), 1 deletions(-)
16 diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
17 index 5a460fa..b624f9b 100644
18 --- a/fs/ocfs2/quota_local.c
19 +++ b/fs/ocfs2/quota_local.c
24 +#include "uptodate.h"
26 /* Number of local quota structures per block */
27 static inline unsigned int ol_quota_entries_per_block(struct super_block *sb)
28 @@ -979,6 +980,8 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
32 + ocfs2_set_new_buffer_uptodate(lqinode, bh);
34 dchunk = (struct ocfs2_local_disk_chunk *)bh->b_data;
36 handle = ocfs2_start_trans(OCFS2_SB(sb), 2);
37 @@ -999,7 +1002,6 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
38 memset(dchunk->dqc_bitmap, 0,
39 sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
40 OCFS2_QBLK_RESERVED_SPACE);
41 - set_buffer_uptodate(bh);
43 status = ocfs2_journal_dirty(handle, bh);