percpu: add __percpu sparse annotations to fs
Add __percpu sparse annotations to fs. These annotations are to make sparse consider percpu variables to be in a different address space and warn if accessed without going through percpu accessors. This patch doesn't affect normal builds. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Alex Elder <aelder@sgi.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -57,12 +57,12 @@ static inline void nfs_add_fscache_stats(struct inode *inode,
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline struct nfs_iostats *nfs_alloc_iostats(void)
|
||||
static inline struct nfs_iostats __percpu *nfs_alloc_iostats(void)
|
||||
{
|
||||
return alloc_percpu(struct nfs_iostats);
|
||||
}
|
||||
|
||||
static inline void nfs_free_iostats(struct nfs_iostats *stats)
|
||||
static inline void nfs_free_iostats(struct nfs_iostats __percpu *stats)
|
||||
{
|
||||
if (stats != NULL)
|
||||
free_percpu(stats);
|
||||
|
Reference in New Issue
Block a user