lkml.org 
[lkml]   [2004]   [Apr]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 26 Apr 2004 23:49:05 -0700 (PDT)
FromJunfeng Yang <>
Subject[CHECKER] no mark_buffer_dirty in journal_set_features in JBD
The function journal_set_features in fs/jbd/journal.c modifies the journal
super block, but doesn't not mark it dirty.  Seems an error, but could be
that these features don't need to be updated on disk.

file fs/jbd/journal.c
-------------------------------------------------------------------
[BUG] sb is modified but not marked dirty
/* Published API: Mark a given journal feature as present on the
 * superblock.  Returns true if the requested features could be set. */
int journal_set_features (journal_t *journal, unsigned long compat,
			  unsigned long ro, unsigned long incompat)
{
	journal_superblock_t *sb;
	if (journal_check_used_features(journal, compat, ro, incompat))
		return 1;
	if (!journal_check_available_features(journal, compat, ro, incompat))
		return 0;
	jbd_debug(1, "Setting new features 0x%lx/0x%lx/0x%lx\n",
		  compat, ro, incompat);

	sb = journal->j_superblock;

	sb->s_feature_compat    |= cpu_to_be32(compat);
	sb->s_feature_ro_compat |= cpu_to_be32(ro);
	sb->s_feature_incompat  |= cpu_to_be32(incompat);
	return 1;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:02    [from the cache]
©2003-2008