summaryrefslogtreecommitdiff
path: root/include/mtd/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorCen Zhang <zzzccc427@gmail.com>2026-03-18 15:32:53 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2026-03-24 17:21:01 +0000
commit5471834a96fb697874be2ca0b052e74bcf3c23d1 (patch)
tree8b820ccfc7c6fd08643bda26d4ffda5c74286e6f /include/mtd/git@git.tavy.me:linux-stable.git
parent1e134c33b931a1b082605b15116403571dab6bbb (diff)
f2fs: add READ_ONCE() for i_blocks in f2fs_update_inode()
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. Fixes: 19f99cee206c ("f2fs: add core inode operations") Cc: stable@vger.kernel.org Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/mtd/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions