summaryrefslogtreecommitdiff
path: root/fs/jbd/journal.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-08-23 21:56:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-08-23 21:56:22 -0700
commit62688e5b6465395c093b91bd4c29794758eb24fe (patch)
treedd93cde16970aa5ca8286b1b245006cf018c4058 /fs/jbd/journal.c
parentf4673d6f185533a93990a12d283aead3b0177533 (diff)
parent68766a2edcd5cd744262a70a2f67a320ac944760 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull UDF, ext3 & reiserfs fixes from Jan Kara: "A couple of fixes (udf, reiserfs, ext3) that accumulated over my vacation." * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: fix retun value on error path in udf_load_logicalvol jbd: don't write superblock when unmounting an ro filesystem reiserfs: fix deadlocks with quotas quota: Move down dqptr_sem read after initializing default warn[] type at __dquot_alloc_space(). UDF: During mount free lvid_bh before rescanning with different blocksize udf: fix udf_setsize() for file data in ICB
Diffstat (limited to 'fs/jbd/journal.c')
-rw-r--r--fs/jbd/journal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 09357508ec9a..a2862339323b 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -1113,6 +1113,11 @@ static void mark_journal_empty(journal_t *journal)
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);