diff options
author | Ira Weiny <ira.weiny@intel.com> | 2019-06-06 03:45:34 +0200 |
---|---|---|
committer | Jeff Layton <jlayton@kernel.org> | 2019-06-19 14:49:37 +0200 |
commit | d51f527f44f96276a94c191bc160de051f64aeea (patch) | |
tree | ca76d089fdc5fc6665eb30254a380b98060377f2 /fs/locks.c | |
parent | Linux 5.2-rc5 (diff) | |
download | linux-d51f527f44f96276a94c191bc160de051f64aeea.tar.xz linux-d51f527f44f96276a94c191bc160de051f64aeea.zip |
locks: Add trace_leases_conflict
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/locks.c b/fs/locks.c index ec1e4a5df629..0cc2b9f30e22 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1534,11 +1534,21 @@ static void time_out_leases(struct inode *inode, struct list_head *dispose) static bool leases_conflict(struct file_lock *lease, struct file_lock *breaker) { - if ((breaker->fl_flags & FL_LAYOUT) != (lease->fl_flags & FL_LAYOUT)) - return false; - if ((breaker->fl_flags & FL_DELEG) && (lease->fl_flags & FL_LEASE)) - return false; - return locks_conflict(breaker, lease); + bool rc; + + if ((breaker->fl_flags & FL_LAYOUT) != (lease->fl_flags & FL_LAYOUT)) { + rc = false; + goto trace; + } + if ((breaker->fl_flags & FL_DELEG) && (lease->fl_flags & FL_LEASE)) { + rc = false; + goto trace; + } + + rc = locks_conflict(breaker, lease); +trace: + trace_leases_conflict(rc, lease, breaker); + return rc; } static bool |