]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - 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/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-quota-Mark-buffer-uptodate-before-calling-ocfs2_jou.patch
diff --git a/src/patches/suse-2.6.27.31/patches.fixes/ocfs2-quota-Mark-buffer-uptodate-before-calling-ocfs2_jou.patch b/src/patches/suse-2.6.27.31/patches.fixes/ocfs2-quota-Mark-buffer-uptodate-before-calling-ocfs2_jou.patch
new file mode 100644 (file)
index 0000000..e39726e
--- /dev/null
@@ -0,0 +1,42 @@
+From 20ee86b5d0f26117b102012fd33eb05048f0a583 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Wed, 17 Jun 2009 19:04:54 +0200
+Subject: [PATCH 2/6] ocfs2: Mark buffer uptodate before calling ocfs2_journal_access()
+
+In a code path extending local quota files we marked new header
+buffer uptodate only after calling ocfs2_journal_access() which
+triggers a bug. Fix it and also call ocfs2 variant of the function
+marking buffer uptodate.
+
+Signed-off-by: Jan Kara <jack@suse.cz>
+---
+ fs/ocfs2/quota_local.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/fs/ocfs2/quota_local.c
++++ b/fs/ocfs2/quota_local.c
+@@ -20,6 +20,7 @@
+ #include "sysfile.h"
+ #include "dlmglue.h"
+ #include "quota.h"
++#include "uptodate.h"
+ /* Number of local quota structures per block */
+ static inline unsigned int ol_quota_entries_per_block(struct super_block *sb)
+@@ -968,6 +969,8 @@ static struct ocfs2_quota_chunk *ocfs2_l
+               mlog_errno(status);
+               goto out;
+       }
++      ocfs2_set_new_buffer_uptodate(lqinode, bh);
++
+       dchunk = (struct ocfs2_local_disk_chunk *)bh->b_data;
+       handle = ocfs2_start_trans(OCFS2_SB(sb), 2);
+@@ -988,7 +991,6 @@ static struct ocfs2_quota_chunk *ocfs2_l
+       memset(dchunk->dqc_bitmap, 0,
+              sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
+              OCFS2_QBLK_RESERVED_SPACE);
+-      set_buffer_uptodate(bh);
+       unlock_buffer(bh);
+       status = ocfs2_journal_dirty(handle, bh);
+       if (status < 0) {