fs: create file_write_started() helper
authorAmir Goldstein <amir73il@gmail.com>
Wed, 22 Nov 2023 12:27:14 +0000 (14:27 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 24 Nov 2023 09:39:19 +0000 (10:39 +0100)
commit3d5cd4911e04683df8f4439fddd788e00a2510a8
tree3b5cd5db52f10ff455df222befb343a0c7821095
parent8802e580ee643e3f63c6b39ff64e7c7baa4a55ba
fs: create file_write_started() helper

Convenience wrapper for sb_write_started(file_inode(inode)->i_sb)), which
has a single occurrence in the code right now.

Document the false negatives of those helpers, which makes them unusable
to assert that sb_start_write() is not held.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231122122715.2561213-16-amir73il@gmail.com
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/read_write.c
include/linux/fs.h