]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-quota-Mark-buffer-uptodate-before-calling-ocfs2_jou.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-quota-Mark-buffer-uptodate-before-calling-ocfs2_jou.patch
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()
5
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.
10
11 Signed-off-by: Jan Kara <jack@suse.cz>
12 ---
13 fs/ocfs2/quota_local.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16 --- a/fs/ocfs2/quota_local.c
17 +++ b/fs/ocfs2/quota_local.c
18 @@ -20,6 +20,7 @@
19 #include "sysfile.h"
20 #include "dlmglue.h"
21 #include "quota.h"
22 +#include "uptodate.h"
23
24 /* Number of local quota structures per block */
25 static inline unsigned int ol_quota_entries_per_block(struct super_block *sb)
26 @@ -968,6 +969,8 @@ static struct ocfs2_quota_chunk *ocfs2_l
27 mlog_errno(status);
28 goto out;
29 }
30 + ocfs2_set_new_buffer_uptodate(lqinode, bh);
31 +
32 dchunk = (struct ocfs2_local_disk_chunk *)bh->b_data;
33
34 handle = ocfs2_start_trans(OCFS2_SB(sb), 2);
35 @@ -988,7 +991,6 @@ static struct ocfs2_quota_chunk *ocfs2_l
36 memset(dchunk->dqc_bitmap, 0,
37 sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
38 OCFS2_QBLK_RESERVED_SPACE);
39 - set_buffer_uptodate(bh);
40 unlock_buffer(bh);
41 status = ocfs2_journal_dirty(handle, bh);
42 if (status < 0) {