[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <wybltui5ewo25wrvw4j53pk5bnepdnkjmgp5232tjvmnrmvcab@cklxztcoqtfa>
Date: Tue, 4 Nov 2025 13:32:12 +0100
From: Jan Kara <jack@...e.cz>
To: Christian Brauner <brauner@...nel.org>
Cc: linux-fsdevel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>, linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org
Subject: Re: [PATCH RFC 1/8] fs: add super_write_guard
On Tue 04-11-25 13:12:30, Christian Brauner wrote:
> Signed-off-by: Christian Brauner <brauner@...nel.org>
Yeah, I think this can be a win. Feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
> ---
> include/linux/fs.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index c895146c1444..9d403c00fbf3 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2052,6 +2052,11 @@ static inline void sb_start_write(struct super_block *sb)
> __sb_start_write(sb, SB_FREEZE_WRITE);
> }
>
> +DEFINE_GUARD(super_write,
> + struct super_block *,
> + sb_start_write(_T),
> + sb_end_write(_T))
> +
> static inline bool sb_start_write_trylock(struct super_block *sb)
> {
> return __sb_start_write_trylock(sb, SB_FREEZE_WRITE);
>
> --
> 2.47.3
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists