lkml.org 
[lkml]   [2021]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] ceph: conversion to new fscache API
Date
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.

David

\
 
 \ /
  Last update: 2021-11-29 17:49    [W:2.670 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site