[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <278917.1638204396@warthog.procyon.org.uk>
Date: Mon, 29 Nov 2021 16:46:36 +0000
From: David Howells <dhowells@...hat.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: dhowells@...hat.com, ceph-devel@...r.kernel.org,
idryomov@...il.com, linux-fsdevel@...r.kernel.org,
linux-cachefs@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] ceph: conversion to new fscache API
Jeff Layton <jlayton@...nel.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.
David
Powered by blists - more mailing lists