summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2019-06-05 18:45:34 -0700
committerJeff Layton <jlayton@kernel.org>2019-06-19 08:49:37 -0400
commitd51f527f44f96276a94c191bc160de051f64aeea (patch)
treeca76d089fdc5fc6665eb30254a380b98060377f2 /fs
parent9e0babf2c06c73cda2c0cd37a1653d823adb40ec (diff)
downloadlinux-d51f527f44f96276a94c191bc160de051f64aeea.tar.bz2
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')
-rw-r--r--fs/locks.c20
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