Re: [PATCH] jbd2: Document the h_invalid flag of a handle

From: Jan Kara

Date: Wed Nov 25 2026 - 15:06:45 EST


On Wed 25-11-26 18:40:27, TAKANO Mitsuhiro wrote:
> struct jbd2_journal_handle has an h_invalid bit: ext4 sets it when it
> has given up on the handle, and __ext4_journal_stop() BUG_ONs when the
> bit is clear. The kernel-doc comment lists the other three flags and
> not this one, so kernel-doc reports the member twice:
>
> Warning: include/linux/jbd2.h:523 struct member 'h_invalid' not
> described in 'jbd2_journal_handle'
>
> Add the line next to h_aborted.
>
> Verification: kernel-doc -none include/linux/jbd2.h prints that warning
> twice before the change and nothing after it.
>
> Signed-off-by: TAKANO Mitsuhiro <takano32@xxxxxxxxx>

See below for updated text:

> @@ -482,6 +482,7 @@ struct jbd2_revoke_table_s;
> * @h_sync: Flag for sync-on-close.
> * @h_reserved: Flag for handle for reserved credits.
> * @h_aborted: Flag indicating fatal error on handle.
> + * @h_invalid: Flag indicating the handle must not be used any more.

Please write here "Flag indicating the handle is not pointing to a real
journal. Used by ext4 nojournal mode."

> * @h_type: For handle statistics.
> * @h_line_no: For handle statistics.
> * @h_start_jiffies: Handle Start time.

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR