fs/locks: remove useless assignment in fcntl_getlk
authorTian Tao <tiantao6@hisilicon.com>
Tue, 13 Apr 2021 01:58:23 +0000 (09:58 +0800)
committerJeff Layton <jlayton@kernel.org>
Tue, 13 Apr 2021 11:26:38 +0000 (07:26 -0400)
Function parameter 'cmd' is rewritten with unused value at locks.c

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/locks.c

index ecaecd1f1b588658d1e749013214ec8258c24abf..003873da17e2ec85c9ea82f95e7e2908995083a2 100644 (file)
@@ -2372,7 +2372,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;
        }