Skip to contentSkip to conversation

locks: add tracepoint in flock codepath

PATCH New Jeff Layton 1 participant 1 message Aug 6, 2018

Subsystems (3)
lore
Share & tools
lore

Jeff Layton

author maintainer
#0 lore raw

PATCH 1/1 locks: add tracepoint in flock codepath

---
 fs/locks.c                      | 1 +
 include/trace/events/filelock.h | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
fs/locks.c +1 -0
index e533623e2e99..6138a9bcd924 100644
@@ -990,6 +990,7 @@ static int flock_lock_inode(struct inode *inode, struct file_lock *request)
 	if (new_fl)
 		locks_free_lock(new_fl);
 	locks_dispose_list(&dispose);
+	trace_flock_lock_inode(inode, request, error);
 	return error;
 }
 
include/trace/events/filelock.h +4 -1
index d1faf3597b9d..68b17c116907 100644
@@ -112,8 +112,11 @@ DEFINE_EVENT(filelock_lock, locks_remove_posix,
 		TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
 		TP_ARGS(inode, fl, ret));
 
-DECLARE_EVENT_CLASS(filelock_lease,
+DEFINE_EVENT(filelock_lock, flock_lock_inode,
+		TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
+		TP_ARGS(inode, fl, ret));
 
+DECLARE_EVENT_CLASS(filelock_lease,
 	TP_PROTO(struct inode *inode, struct file_lock *fl),
 
 	TP_ARGS(inode, fl),
Signature · 1 line
2.17.1