linux-stable/fs/nfs/sysfs.h
Trond Myklebust 094eca3719 NFSv4: Fix up RCU annotations for struct nfs_netns_client
The identifier is read as an RCU protected string. Its value may
be changed during the lifetime of the network namespace by writing
a new string into the sysfs pseudofile (at which point, we free the
old string only after a call to synchronize_rcu()).

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2020-10-15 13:31:08 -04:00

25 lines
506 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 Hammerspace Inc
*/
#ifndef __NFS_SYSFS_H
#define __NFS_SYSFS_H
#define CONTAINER_ID_MAXLEN (64)
struct nfs_netns_client {
struct kobject kobject;
struct net *net;
const char __rcu *identifier;
};
extern struct kobject *nfs_client_kobj;
extern int nfs_sysfs_init(void);
extern void nfs_sysfs_exit(void);
void nfs_netns_sysfs_setup(struct nfs_net *netns, struct net *net);
void nfs_netns_sysfs_destroy(struct nfs_net *netns);
#endif