mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
9e0babf2c0
commit
d51f527f44
2 changed files with 50 additions and 5 deletions
20
fs/locks.c
20
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue