]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
locks: remove extraneous IS_POSIX and IS_FLOCK tests
authorJeff Layton <jeff.layton@primarydata.com>
Fri, 3 Apr 2015 13:04:02 +0000 (09:04 -0400)
committerJeff Layton <jeff.layton@primarydata.com>
Fri, 3 Apr 2015 13:04:02 +0000 (09:04 -0400)
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>
fs/locks.c

index 4517b8bfca1189ddaddc6b9e2b79799a92b2d3c9..f88ed45066648a5e5aa965bd562bd3434849ea7c 100644 (file)
@@ -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 */
@@ -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;