Skip to contentSkip to conversation

f2fs: lost matching-pair of trace in f2fs_truncate_inode_blocks

PATCH In review fengyubo 2 participants 2 messages Jun 20, 2020 F2FS file system

lore
Share & tools
lore

fengyubo

author
#0 lore raw

PATCH 1/1 f2fs: lost matching-pair of trace in f2fs_truncate_inode_blocks

From: Yubo Feng <[email protected]>

if get_node_path() return -E2BIG and trace of
f2fs_truncate_inode_blocks_enter/exit enabled
then the matching-pair of trace_exit will lost
in log.

---
 fs/f2fs/node.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/f2fs/node.c +3 -1
index ecbd6bd1..e6bfb58 100644
@@ -1041,8 +1041,10 @@ int f2fs_truncate_inode_blocks(struct inode *inode, pgoff_t from)
 	trace_f2fs_truncate_inode_blocks_enter(inode, from);
 
 	level = get_node_path(inode, from, offset, noffset);
-	if (level < 0)
+	if (level < 0) {
+		trace_f2fs_truncate_inode_blocks_exit(inode, level);
 		return level;
+	}
 
 	page = f2fs_get_node_page(sbi, inode->i_ino);
 	if (IS_ERR(page)) {
Signature · 8 lines
2.7.4



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · fengyubo

From: Yubo Feng <[email protected]>

if get_node_path() return -E2BIG and trace of
f2fs_truncate_inode_blocks_enter/exit enabled
then the matching-pair of trace_exit will lost
in log.

Thanks,

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