All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] f2fs: fix wrong value of tracepoint parameter
@ 2020-05-27 10:27 ` Chao Yu
  0 siblings, 0 replies; 18+ messages in thread
From: Chao Yu @ 2020-05-27 10:27 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

In f2fs_lookup(), we should set @err correctly before printing it
in tracepoint.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/namei.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 63b34a161cf4..2c2f8c36c828 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -504,6 +504,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
 			err = PTR_ERR(page);
 			goto out;
 		}
+		err = -ENOENT;
 		goto out_splice;
 	}
 
@@ -549,7 +550,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
 #endif
 	new = d_splice_alias(inode, dentry);
 	err = PTR_ERR_OR_ZERO(new);
-	trace_f2fs_lookup_end(dir, dentry, ino, err);
+	trace_f2fs_lookup_end(dir, dentry, ino, !new ? -ENOENT : err);
 	return new;
 out_iput:
 	iput(inode);
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-05-29  6:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 10:27 [PATCH 1/3] f2fs: fix wrong value of tracepoint parameter Chao Yu
2020-05-27 10:27 ` [f2fs-dev] " Chao Yu
2020-05-27 10:27 ` [PATCH 2/3] f2fs: remove unneeded return value of __insert_discard_tree() Chao Yu
2020-05-27 10:27   ` [f2fs-dev] " Chao Yu
2020-05-27 10:27 ` [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock Chao Yu
2020-05-27 10:27   ` [f2fs-dev] " Chao Yu
2020-05-27 21:02   ` Jaegeuk Kim
2020-05-27 21:02     ` [f2fs-dev] " Jaegeuk Kim
2020-05-28  1:23     ` Chao Yu
2020-05-28  1:23       ` [f2fs-dev] " Chao Yu
2020-05-28  1:26       ` Jaegeuk Kim
2020-05-28  1:26         ` [f2fs-dev] " Jaegeuk Kim
2020-05-28  1:47         ` Chao Yu
2020-05-28  1:47           ` [f2fs-dev] " Chao Yu
2020-05-28 19:00           ` Jaegeuk Kim
2020-05-28 19:00             ` [f2fs-dev] " Jaegeuk Kim
2020-05-29  6:37             ` Chao Yu
2020-05-29  6:37               ` [f2fs-dev] " Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.