Skip to content

Commit

Permalink
jbd2: Fix comment describing journal_init_common()
Browse files Browse the repository at this point in the history
The code indicates that journal_init_common() fills the journal_t object
it returns while the comment incorrectly states that only a few fields are
initialised.  Also, the comment claims that journal structures could be
created from scratch which isn't possible as journal_init_common() calls
journal_load_superblock() which loads and checks journal superblock from
disk.

Signed-off-by: Daniel Martín Gómez <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Zhang Yi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
  • Loading branch information
dalmemail authored and tytso committed Nov 13, 2024
1 parent e06a8c2 commit 3e7c69c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,9 +1512,10 @@ static int journal_load_superblock(journal_t *journal)
* destroy journal_t structures, and to initialise and read existing
* journal blocks from disk. */

/* First: create and setup a journal_t object in memory. We initialise
* very few fields yet: that has to wait until we have created the
* journal structures from from scratch, or loaded them from disk. */
/* The journal_init_common() function creates and fills a journal_t object
* in memory. It calls journal_load_superblock() to load the on-disk journal
* superblock and initialize the journal_t object.
*/

static journal_t *journal_init_common(struct block_device *bdev,
struct block_device *fs_dev,
Expand Down

0 comments on commit 3e7c69c

Please sign in to comment.