Linux-CIFS Archive on lore.kernel.org
 help / color / Atom feed
From: Steve French <smfrench@gmail.com>
To: Murphy Zhou <jencce.kernel@gmail.com>
Cc: CIFS <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH] CIFS: unlock file across process
Date: Thu, 13 Feb 2020 23:32:42 -0600
Message-ID: <CAH2r5msoTB2_TB3kefknp_AeiE62Ed4m5zO6UmKvQt6wovGa9g@mail.gmail.com> (raw)
In-Reply-To: <20200214043513.uh2jtb62qf54nmud@xzhoux.usersys.redhat.com>

merged into cifs-2.6.git for-next

On Thu, Feb 13, 2020 at 10:35 PM Murphy Zhou <jencce.kernel@gmail.com> wrote:
>
> 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
>


-- 
Thanks,

Steve

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  4:35 Murphy Zhou
2020-02-14  5:32 ` Steve French [this message]
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

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH2r5msoTB2_TB3kefknp_AeiE62Ed4m5zO6UmKvQt6wovGa9g@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=jencce.kernel@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-CIFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-cifs/0 linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ https://lore.kernel.org/linux-cifs \
		linux-cifs@vger.kernel.org
	public-inbox-index linux-cifs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-cifs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git