diff options
author | Chao Yu <chao@kernel.org> | 2023-10-07 15:45:52 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-10-09 10:48:51 -0700 |
commit | 8b07c1fb0f1ad139373c8253f2fad8bc43fab07d (patch) | |
tree | bd2966c08387f46e9a1768b6bcc7adc1684433ec /fs/f2fs | |
parent | d7e9a9037de27b642d5a3edef7c69e2a2b460287 (diff) |
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")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 2403fd1de5a0..06d35b8aceef 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3258,6 +3258,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; |