diff mbox

[RFC,v2,1/4] locks: Remove unnecessary IS_POSIX test

Message ID 1425306313-7234-2-git-send-email-daniel.wagner@bmw-carit.de (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Wagner March 2, 2015, 2:25 p.m. UTC
Since following change

commit bd61e0a9c852de2d705b6f1bb2cc54c5774db570
Author: Jeff Layton <jlayton@primarydata.com>
Date:   Fri Jan 16 15:05:55 2015 -0500

    locks: convert posix locks to file_lock_context

all Posix locks are kept on their a separate list, so the test is
redudant.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Jeff Layton <jlayton@primarydata.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
---
 fs/locks.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jeff Layton March 3, 2015, 12:55 a.m. UTC | #1
On Mon,  2 Mar 2015 15:25:10 +0100
Daniel Wagner <daniel.wagner@bmw-carit.de> wrote:

> Since following change
> 
> commit bd61e0a9c852de2d705b6f1bb2cc54c5774db570
> Author: Jeff Layton <jlayton@primarydata.com>
> Date:   Fri Jan 16 15:05:55 2015 -0500
> 
>     locks: convert posix locks to file_lock_context
> 
> all Posix locks are kept on their a separate list, so the test is
> redudant.
> 
> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> Cc: Jeff Layton <jlayton@primarydata.com>
> Cc: "J. Bruce Fields" <bfields@fieldses.org>
> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
> ---
>  fs/locks.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/locks.c b/fs/locks.c
> index 365c82e..f63aa92 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -964,8 +964,6 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
>  	 */
>  	if (request->fl_type != F_UNLCK) {
>  		list_for_each_entry(fl, &ctx->flc_posix, fl_list) {
> -			if (!IS_POSIX(fl))
> -				continue;
>  			if (!posix_locks_conflict(request, fl))
>  				continue;
>  			if (conflock)

Merged for v4.1.

Thanks!
diff mbox

Patch

diff --git a/fs/locks.c b/fs/locks.c
index 365c82e..f63aa92 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -964,8 +964,6 @@  static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
 	 */
 	if (request->fl_type != F_UNLCK) {
 		list_for_each_entry(fl, &ctx->flc_posix, fl_list) {
-			if (!IS_POSIX(fl))
-				continue;
 			if (!posix_locks_conflict(request, fl))
 				continue;
 			if (conflock)