Skip to content

Commit 3e7c69c

Browse files
dalmemailtytso
authored andcommitted
jbd2: Fix comment describing journal_init_common()
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 <dalme@riseup.net> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Link: https://patch.msgid.link/20241107144538.3544-1-dalme@riseup.net Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent e06a8c2 commit 3e7c69c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

fs/jbd2/journal.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,9 +1512,10 @@ static int journal_load_superblock(journal_t *journal)
15121512
* destroy journal_t structures, and to initialise and read existing
15131513
* journal blocks from disk. */
15141514

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

15191520
static journal_t *journal_init_common(struct block_device *bdev,
15201521
struct block_device *fs_dev,

0 commit comments

Comments
 (0)