Skip to content

Commit c883da3

Browse files
committed
locks: add tracepoint in flock codepath
Signed-off-by: Jeff Layton <jlayton@kernel.org>
1 parent 1cf8e5d commit c883da3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎fs/locks.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ static int flock_lock_inode(struct inode *inode, struct file_lock *request)
990990
if (new_fl)
991991
locks_free_lock(new_fl);
992992
locks_dispose_list(&dispose);
993+
trace_flock_lock_inode(inode, request, error);
993994
return error;
994995
}
995996

‎include/trace/events/filelock.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ DEFINE_EVENT(filelock_lock, locks_remove_posix,
112112
TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
113113
TP_ARGS(inode, fl, ret));
114114

115-
DECLARE_EVENT_CLASS(filelock_lease,
115+
DEFINE_EVENT(filelock_lock, flock_lock_inode,
116+
TP_PROTO(struct inode *inode, struct file_lock *fl, int ret),
117+
TP_ARGS(inode, fl, ret));
116118

119+
DECLARE_EVENT_CLASS(filelock_lease,
117120
TP_PROTO(struct inode *inode, struct file_lock *fl),
118121

119122
TP_ARGS(inode, fl),

0 commit comments

Comments
 (0)