linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: ceph-devel@vger.kernel.org, idryomov@gmail.com,
	linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ceph: conversion to new fscache API
Date: Wed, 01 Dec 2021 06:31:00 -0500	[thread overview]
Message-ID: <06e4f9955ee9e964724ecc2047fef6e4c9606b14.camel@kernel.org> (raw)
In-Reply-To: <278917.1638204396@warthog.procyon.org.uk>

On Mon, 2021-11-29 at 16:46 +0000, David Howells wrote:
> Jeff Layton <jlayton@kernel.org> wrote:
> 
> > +void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci)
> >  {
> > -	return fscache_register_netfs(&ceph_cache_netfs);
> > +	struct fscache_cookie* cookie = xchg(&ci->fscache, NULL);
> > +
> > +	fscache_relinquish_cookie(cookie, false);
> >  }
> 
> xchg() should be excessive there.  This is only called from
> ceph_evict_inode().  Also, if you're going to reset the pointer, it might be
> worth poisoning it rather than nulling it.
> 

Ok, makes sense. I'll make that change soon.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2021-12-01 11:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 16:29 [PATCH 0/2] ceph: adapt ceph to the fscache rewrite Jeff Layton
2021-11-29 16:29 ` [PATCH 1/2] ceph: conversion to new fscache API Jeff Layton
2021-11-29 16:29 ` [PATCH 2/2] ceph: add fscache writeback support Jeff Layton
2021-11-29 16:46 ` [PATCH 1/2] ceph: conversion to new fscache API David Howells
2021-12-01 11:31   ` Jeff Layton [this message]
2021-12-06  9:57 ` David Howells
2021-12-06 10:59   ` Jeff Layton
2021-12-06 11:12 ` [PATCH 2/2] ceph: add fscache writeback support David Howells
  -- strict thread matches above, loose matches on Subject: below --
2021-10-25 13:24 [PATCH 0/2] ceph: conversion to fscache API rewrite Jeff Layton
2021-10-25 13:24 ` [PATCH 1/2] ceph: conversion to new fscache API Jeff Layton

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=06e4f9955ee9e964724ecc2047fef6e4c9606b14.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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
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).