linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Nikolay Borisov <nborisov@suse.com>
Cc: bfields@fieldses.org, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] locks: Use inode_is_open_for_write
Date: Mon, 17 Dec 2018 07:21:39 -0500	[thread overview]
Message-ID: <1fe6e58f3f62718134f691b2cc149fbf2aa6f28d.camel@kernel.org> (raw)
In-Reply-To: <20181211082925.21203-1-nborisov@suse.com>

On Tue, 2018-12-11 at 10:29 +0200, Nikolay Borisov wrote:
> Use the aptly named function rather than open coding it. No functional
> changes.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  fs/locks.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/locks.c b/fs/locks.c
> index 2ecb4db8c840..16ea7d89a67d 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -1646,7 +1646,7 @@ check_conflicting_open(const struct dentry *dentry, const long arg, int flags)
>  	if (flags & FL_LAYOUT)
>  		return 0;
>  
> -	if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0))
> +	if ((arg == F_RDLCK) && inode_is_open_for_write(inode))
>  		return -EAGAIN;
>  
>  	if ((arg == F_WRLCK) && ((d_count(dentry) > 1) ||

Thanks, merged into locks-next. This should make v4.21.
-- 
Jeff Layton <jlayton@kernel.org>

      reply	other threads:[~2018-12-17 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11  8:29 [PATCH] locks: Use inode_is_open_for_write Nikolay Borisov
2018-12-17 12:21 ` Jeff Layton [this message]

Reply instructions:

You may reply publicly 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=1fe6e58f3f62718134f691b2cc149fbf2aa6f28d.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=bfields@fieldses.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=viro@zeniv.linux.org.uk \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).