Skip to content

Commit

Permalink
locks: remove extraneous IS_POSIX and IS_FLOCK tests
Browse files Browse the repository at this point in the history
We know that the locks being passed into this function are of the
correct type, now that they live on their own lists.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
  • Loading branch information
Jeff Layton committed Apr 3, 2015
1 parent 9cd2904 commit 9b8c869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ static int posix_locks_conflict(struct file_lock *caller_fl, struct file_lock *s
/* POSIX locks owned by the same process do not conflict with
* each other.
*/
if (!IS_POSIX(sys_fl) || posix_same_owner(caller_fl, sys_fl))
if (posix_same_owner(caller_fl, sys_fl))
return (0);

/* Check whether they overlap */
Expand All @@ -748,7 +748,7 @@ static int flock_locks_conflict(struct file_lock *caller_fl, struct file_lock *s
/* FLOCK locks referring to the same filp do not conflict with
* each other.
*/
if (!IS_FLOCK(sys_fl) || (caller_fl->fl_file == sys_fl->fl_file))
if (caller_fl->fl_file == sys_fl->fl_file)
return (0);
if ((caller_fl->fl_type & LOCK_MAND) || (sys_fl->fl_type & LOCK_MAND))
return 0;
Expand Down

0 comments on commit 9b8c869

Please sign in to comment.