Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 439502 | Differences between
and this patch

Collapse All | Expand All

(-)a/fs/jbd2/journal.c (-3 / +5 lines)
Lines 1351-1368 void jbd2_journal_update_sb_log_tail(journal_t *journal, tid_t tail_tid, Link Here
1351
static void jbd2_mark_journal_empty(journal_t *journal)
1351
static void jbd2_mark_journal_empty(journal_t *journal)
1352
{
1352
{
1353
	journal_superblock_t *sb = journal->j_superblock;
1353
	journal_superblock_t *sb = journal->j_superblock;
1354
	__be32		new_tail_sequence;
1354
1355
1355
	BUG_ON(!mutex_is_locked(&journal->j_checkpoint_mutex));
1356
	BUG_ON(!mutex_is_locked(&journal->j_checkpoint_mutex));
1356
	read_lock(&journal->j_state_lock);
1357
	read_lock(&journal->j_state_lock);
1357
	/* Is it already empty? */
1358
	new_tail_sequence = cpu_to_be32(journal->j_tail_sequence);
1358
	if (sb->s_start == 0) {
1359
	/* Nothing to do? */
1360
	if (sb->s_start == 0 && sb->s_sequence == new_tail_sequence) {
1359
		read_unlock(&journal->j_state_lock);
1361
		read_unlock(&journal->j_state_lock);
1360
		return;
1362
		return;
1361
	}
1363
	}
1362
	jbd_debug(1, "JBD2: Marking journal as empty (seq %d)\n",
1364
	jbd_debug(1, "JBD2: Marking journal as empty (seq %d)\n",
1363
		  journal->j_tail_sequence);
1365
		  journal->j_tail_sequence);
1364
1366
1365
	sb->s_sequence = cpu_to_be32(journal->j_tail_sequence);
1367
	sb->s_sequence = new_tail_sequence;
1366
	sb->s_start    = cpu_to_be32(0);
1368
	sb->s_start    = cpu_to_be32(0);
1367
	read_unlock(&journal->j_state_lock);
1369
	read_unlock(&journal->j_state_lock);

Return to bug 439502