Commit 8b07c1fb authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

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: c4020b2d ("f2fs: support F2FS_IOC_PRECACHE_EXTENTS")
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent d7e9a903
...@@ -3258,6 +3258,7 @@ int f2fs_precache_extents(struct inode *inode) ...@@ -3258,6 +3258,7 @@ int f2fs_precache_extents(struct inode *inode)
return -EOPNOTSUPP; return -EOPNOTSUPP;
map.m_lblk = 0; map.m_lblk = 0;
map.m_pblk = 0;
map.m_next_pgofs = NULL; map.m_next_pgofs = NULL;
map.m_next_extent = &m_next_extent; map.m_next_extent = &m_next_extent;
map.m_seg_type = NO_CHECK_TYPE; map.m_seg_type = NO_CHECK_TYPE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment