locks: Add trace_leases_conflict

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
This commit is contained in:
Ira Weiny
2019-06-05 18:45:34 -07:00
committed by Jeff Layton
parent 9e0babf2c0
commit d51f527f44
2 changed files with 50 additions and 5 deletions

View File

@@ -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