Re: [f2fs-dev] [PATCH v2] f2fs: add READ_ONCE() for i_blocks in f2fs_update_inode()
From: patchwork-bot+f2fs
Date: Tue Mar 24 2026 - 13:34:37 EST
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@xxxxxxxxxx>:
On Wed, 18 Mar 2026 15:32:53 +0800 you wrote:
> f2fs_update_inode() reads inode->i_blocks without holding i_lock to
> serialize it to the on-disk inode, while concurrent truncate or
> allocation paths may modify i_blocks under i_lock. Since blkcnt_t is
> u64, this risks torn reads on 32-bit architectures.
>
> Following the approach in ext4_inode_blocks_set(), add READ_ONCE() to prevent
> potential compiler-induced tearing.
>
> [...]
Here is the summary with links:
- [f2fs-dev,v2] f2fs: add READ_ONCE() for i_blocks in f2fs_update_inode()
https://git.kernel.org/jaegeuk/f2fs/c/5471834a96fb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html