]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.5-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Aug 2012 00:46:00 +0000 (17:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Aug 2012 00:46:00 +0000 (17:46 -0700)
added patches:
jbd-don-t-write-superblock-when-unmounting-an-ro-filesystem.patch

queue-3.5/jbd-don-t-write-superblock-when-unmounting-an-ro-filesystem.patch [new file with mode: 0644]
queue-3.5/series

diff --git a/queue-3.5/jbd-don-t-write-superblock-when-unmounting-an-ro-filesystem.patch b/queue-3.5/jbd-don-t-write-superblock-when-unmounting-an-ro-filesystem.patch
new file mode 100644 (file)
index 0000000..febef67
--- /dev/null
@@ -0,0 +1,46 @@
+From 2e84f2641ea91a730642ead558a4ee3bd52310c9 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Wed, 15 Aug 2012 13:50:27 +0200
+Subject: jbd: don't write superblock when unmounting an ro filesystem
+
+From: Jan Kara <jack@suse.cz>
+
+commit 2e84f2641ea91a730642ead558a4ee3bd52310c9 upstream.
+
+This sequence:
+
+results in an IO error when unmounting the RO filesystem. The bug was
+introduced by:
+
+commit 9754e39c7bc51328f145e933bfb0df47cd67b6e9
+Author: Jan Kara <jack@suse.cz>
+Date:   Sat Apr 7 12:33:03 2012 +0200
+
+    jbd: Split updating of journal superblock and marking journal empty
+
+which lost some of the magic in journal_update_superblock() which
+used to test for a journal with no outstanding transactions.
+
+This is a port of a jbd2 fix by Eric Sandeen.
+
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/jbd/journal.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/fs/jbd/journal.c
++++ b/fs/jbd/journal.c
+@@ -1113,6 +1113,11 @@ static void mark_journal_empty(journal_t
+       BUG_ON(!mutex_is_locked(&journal->j_checkpoint_mutex));
+       spin_lock(&journal->j_state_lock);
++      /* Is it already empty? */
++      if (sb->s_start == 0) {
++              spin_unlock(&journal->j_state_lock);
++              return;
++      }
+       jbd_debug(1, "JBD: Marking journal as empty (seq %d)\n",
+                 journal->j_tail_sequence);
index 3b7fd7710d35b790e282cb9e719c50793b5fcf93..ff0f422f174c0634bd7e87e3c4730ad2202a64d1 100644 (file)
@@ -55,3 +55,4 @@ ath9k-fix-decrypt_error-initialization-in-ath_rx_tasklet.patch
 pci-ehci-fix-crash-during-hibernation-on-asus-computers.patch
 gma500-consider-crtc-initially-active.patch
 block-replace-__getblk_slow-misfix-by-grow_dev_page-fix.patch
+jbd-don-t-write-superblock-when-unmounting-an-ro-filesystem.patch