linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CIFS: unlock file across process
@ 2020-02-14  4:35 Murphy Zhou
  2020-02-14  5:32 ` Steve French
  2020-02-14 12:26 ` Jeff Layton
  0 siblings, 2 replies; 9+ messages in thread
From: Murphy Zhou @ 2020-02-14  4:35 UTC (permalink / raw)
  To: linux-cifs

Now child can't unlock the same file that has been locked by
parent. Fix this by not skipping unlock if requesting from
different process.

Patch tested by LTP and xfstests using samba server.

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
 fs/cifs/smb2file.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
index afe1f03aabe3..b5bca0e13d51 100644
--- a/fs/cifs/smb2file.c
+++ b/fs/cifs/smb2file.c
@@ -151,8 +151,6 @@ smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
 		    (flock->fl_start + length) <
 		    (li->offset + li->length))
 			continue;
-		if (current->tgid != li->pid)
-			continue;
 		if (cinode->can_cache_brlcks) {
 			/*
 			 * We can cache brlock requests - simply remove a lock
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-25 19:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14  4:35 [PATCH] CIFS: unlock file across process Murphy Zhou
2020-02-14  5:32 ` Steve French
2020-02-14 12:26 ` Jeff Layton
2020-02-14 14:28   ` Murphy Zhou
2020-02-14 19:03     ` Pavel Shilovsky
2020-02-19  2:10       ` Murphy Zhou
2020-02-24 19:39         ` Pavel Shilovsky
2020-02-25  5:15           ` Murphy Zhou
2020-02-25 19:21             ` Pavel Shilovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).