Skip to contentSkip to conversation

fs/locks: remove useless assignments

PATCH In review Tian Tao 2 participants 2 messages Apr 13, 2021

Subsystems (2)
lore
Share & tools
lore

Tian Tao

author
#0 lore raw

PATCH 1/1 fs/locks: remove useless assignments

Function parameter 'cmd' is rewritten with unused value at locks.c

---
 fs/locks.c | 1 -
 1 file changed, 1 deletion(-)
fs/locks.c +0 -1
index 53cf033..5c42363 100644
@@ -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;
 	}
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 12 lines · Tian Tao

Function parameter 'cmd' is rewritten with unused value at locks.c

---
 fs/locks.c | 1 -
 1 file changed, 1 deletion(-)
fs/locks.c +0 -0
index 53cf033..5c42363 100644

fs/locks.c int fcntl_getlk(struct file *filp, unsigned int cmd, struct flock *flock) · line 2374

Quoted 7 lines
fs/locks.c +0 -1
@@ -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,

Signature · 1 line
Jeff Layton <[email protected]>