Files
linux/fs
John Groves 3fc3ebf40b dax: fix misleading comment about share/index union in dax_folio_reset_order()
The comment in dax_folio_reset_order() claims that DAX maintains an
invariant where folio->share != 0 only when folio->mapping == NULL,
implying folio->share is zero whenever mapping is non-NULL. This is
misleading because folio->share and folio->index are a union -- for
non-shared folios with mapping != NULL, reading folio->share returns
the file page offset (folio->index), which is typically non-zero.

Reword the comment to accurately describe the union aliasing: the
assignment clears whichever interpretation of the union word is active
(index for non-shared folios, share for shared folios), which is correct
because the folio is being released in either case.

No functional change -- the code was already correct, only the
justification was wrong.

Fixes: 59eb73b98a ("dax: Factor out dax_folio_reset_order() helper")

Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: John Groves <john@groves.net>
Link: https://patch.msgid.link/0100019ecc08b8cd-4ee80eeb-1341-4f67-8478-7298129440e9-000000@email.amazonses.com
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
2026-07-14 16:26:42 -07:00
..
2026-05-21 13:39:35 +02:00
2026-05-21 13:39:35 +02:00
2026-06-11 11:42:21 -07:00
2026-07-01 15:26:47 +02:00
2026-01-02 13:43:41 -05:00
2026-07-01 15:26:47 +02:00
2026-05-21 13:39:36 +02:00
2026-05-21 13:39:35 +02:00
2026-01-12 16:52:09 +01:00