Skip to contentSkip to conversation

f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()

PATCH Applied Chao Yu 2 participants 2 messages Oct 7, 2023 – Oct 23, 2023 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()

Otherwise, it may print random physical block address in tracepoint of f2fs_map_blocks() as below:

f2fs_map_blocks: dev = (253,16), ino = 2297, file offset = 0, start blkaddr = 0xa356c421, len = 0x0, flags = 0

Fixes c4020b2da4c9 ("f2fs: support F2FS_IOC_PRECACHE_EXTENTS")
---
 fs/f2fs/file.c | 1 +
 1 file changed, 1 insertion(+)
fs/f2fs/file.c +1 -0
index 5d726cbc4f0b..cfb199f9af0d 100644
@@ -3261,6 +3261,7 @@ int f2fs_precache_extents(struct inode *inode)
 		return -EOPNOTSUPP;
 
 	map.m_lblk = 0;
+	map.m_pblk = 0;
 	map.m_next_pgofs = NULL;
 	map.m_next_extent = &m_next_extent;
 	map.m_seg_type = NO_CHECK_TYPE;
Signature · 1 line
2.40.1
#1 lore raw
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 9 lines · On Sat, 7 Oct 2023 15:45:52 +0800 you wrote:

Otherwise, it may print random physical block address in tracepoint of f2fs_map_blocks() as below:

f2fs_map_blocks: dev = (253,16), ino = 2297, file offset = 0, start blkaddr = 0xa356c421, len = 0x0, flags = 0

Fixes c4020b2da4c9 ("f2fs: support F2FS_IOC_PRECACHE_EXTENTS")

[...]

Here is the summary with links:
- [f2fs-dev] f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()

    https://git.kernel.org/jaegeuk/f2fs/c/8b07c1fb0f1a

You are awesome, thank you!

Signature · 10 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel