All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: "Yan, Zheng" <zyan@redhat.com>, ceph-devel@vger.kernel.org
Subject: Re: [PATCH 1/5] ceph: fix wrong check in ceph_renew_caps()
Date: Wed, 05 Apr 2017 10:16:27 -0400	[thread overview]
Message-ID: <1491401787.18658.6.camel@redhat.com> (raw)
In-Reply-To: <20170405013019.5032-1-zyan@redhat.com>

On Wed, 2017-04-05 at 09:30 +0800, Yan, Zheng wrote:
> Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
> ---
>  fs/ceph/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 579a16c..0480492 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -123,7 +123,7 @@ int ceph_renew_caps(struct inode *inode)
>  	spin_lock(&ci->i_ceph_lock);
>  	wanted = __ceph_caps_file_wanted(ci);
>  	if (__ceph_is_any_real_caps(ci) &&
> -	    (!(wanted & CEPH_CAP_ANY_WR) == 0 || ci->i_auth_cap)) {
> +	    (!(wanted & CEPH_CAP_ANY_WR) || ci->i_auth_cap)) {
>  		int issued = __ceph_caps_issued(ci, NULL);
>  		spin_unlock(&ci->i_ceph_lock);
>  		dout("renew caps %p want %s issued %s updating mds_wanted\n",

That certainly looks more like what was intended, but I'm still a
little unclear on why we have so much special casing in all of this
caps handling.

Why do we skip ceph_check_caps if we want CEPH_CAP_ANY_WR?
-- 
Jeff Layton <jlayton@redhat.com>

  parent reply	other threads:[~2017-04-05 14:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  1:30 [PATCH 1/5] ceph: fix wrong check in ceph_renew_caps() Yan, Zheng
2017-04-05  1:30 ` [PATCH 2/5] ceph: allow connecting to mds whose rank >= mdsmap::m_max_mds Yan, Zheng
2017-04-05  4:39   ` Patrick Donnelly
2017-04-05 22:47   ` Luis Henriques
2017-04-05  1:30 ` [PATCH 3/5] ceph: fix potential use-after-free Yan, Zheng
2017-04-05 17:21   ` Jeff Layton
2017-04-05 23:59     ` Yan, Zheng
2017-04-05  1:30 ` [PATCH 4/5] ceph: close stopped mds' session Yan, Zheng
2017-04-05  1:30 ` [PATCH 5/5] ceph: make seeky readdir more efficiency Yan, Zheng
2017-04-05 14:16 ` Jeff Layton [this message]
2017-04-06  0:04   ` [PATCH 1/5] ceph: fix wrong check in ceph_renew_caps() Yan, Zheng

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=1491401787.18658.6.camel@redhat.com \
    --to=jlayton@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=zyan@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.