Skip to content

Commit

Permalink
locks: add tracepoint in flock codepath
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Layton <[email protected]>
  • Loading branch information
jtlayton committed Aug 6, 2018
1 parent 1cf8e5d commit c883da3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 4 additions & 1 deletion include/trace/events/filelock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit c883da3

Please sign in to comment.