diff mbox series

fs/locks: remove useless assignments

Message ID 1618279103-45362-1-git-send-email-tiantao6@hisilicon.com (mailing list archive)
State New, archived
Headers show
Series fs/locks: remove useless assignments | expand

Commit Message

Tian Tao April 13, 2021, 1:58 a.m. UTC
Function parameter 'cmd' is rewritten with unused value at locks.c

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 fs/locks.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jeffrey Layton April 13, 2021, 11:28 a.m. UTC | #1
On Tue, 2021-04-13 at 09:58 +0800, Tian Tao wrote:
> Function parameter 'cmd' is rewritten with unused value at locks.c
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>  fs/locks.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/locks.c b/fs/locks.c
> index 53cf033..5c42363 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -2369,7 +2369,6 @@ int fcntl_getlk(struct file *filp, unsigned int cmd, struct flock *flock)
>  		if (flock->l_pid != 0)
>  			goto out;
>  
> -		cmd = F_GETLK;
>  		fl->fl_flags |= FL_OFDLCK;
>  		fl->fl_owner = filp;
>  	}

Thanks, merged into the locks-next branch and should make v5.13.

Cheers,
diff mbox series

Patch

diff --git a/fs/locks.c b/fs/locks.c
index 53cf033..5c42363 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2369,7 +2369,6 @@  int fcntl_getlk(struct file *filp, unsigned int cmd, struct flock *flock)
 		if (flock->l_pid != 0)
 			goto out;
 
-		cmd = F_GETLK;
 		fl->fl_flags |= FL_OFDLCK;
 		fl->fl_owner = filp;
 	}