]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs: Verify write lifetime constants at compile time
authorBart Van Assche <bvanassche@acm.org>
Fri, 2 Feb 2024 20:39:21 +0000 (12:39 -0800)
committerChristian Brauner <brauner@kernel.org>
Tue, 6 Feb 2024 13:30:47 +0000 (14:30 +0100)
commite769779c0c2c3a475c6b7313d35ff0aa3aceb780
treee05f0c83bcba7080304b80ff5b849d6764fb9b18
parentec16b147a55bfa14e858234eb7b1a7c8e7cd5021
fs: Verify write lifetime constants at compile time

The code in fs/fcntl.c converts RWH_* constants to and from WRITE_LIFE_*
constants using casts. Verify at compile time that these casts will yield
the intended effect.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Suggested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240202203926.2478590-3-bvanassche@acm.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fcntl.c