David Howells
2021-10-20 23:06:16 +01:00
parent cdf262f294
commit 8e7a867bb7
2 changed files with 19 additions and 0 deletions

View File

@@ -179,4 +179,14 @@ static inline void fscache_wait_for_objects(struct fscache_cache *cache)
atomic_read(&cache->object_count) == 0);
}
#ifdef CONFIG_FSCACHE_STATS
extern atomic_t fscache_n_read;
extern atomic_t fscache_n_write;
#define fscache_count_read() atomic_inc(&fscache_n_read)
#define fscache_count_write() atomic_inc(&fscache_n_write)
#else
#define fscache_count_read() do {} while(0)
#define fscache_count_write() do {} while(0)
#endif
#endif /* _LINUX_FSCACHE_CACHE_H */