summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-12-02 15:21:42 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-07-11 21:20:25 -0400
commitde80977b9c8cbf0a5e7dd3234bad8def9b7a8db8 (patch)
treee0a2bf9b63f79a80a3c133bdf0916ca2798506a1
parent96620c816fb1e7ddee5f6ef2abc04a703426efee (diff)
fs: Convert alloc_inode_sb() to a macro
We're introducing alloc tagging, which tracks memory allocations by callsite. Converting alloc_inode_sb() to a macro means allocations will be tracked by its caller, which is a bit more useful. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Suren Baghdasaryan <surenb@google.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk>
-rw-r--r--include/linux/fs.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2681e6295f88..f04872975260 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2700,11 +2700,7 @@ int setattr_should_drop_sgid(struct mnt_idmap *idmap,
* This must be used for allocating filesystems specific inodes to set
* up the inode reclaim context correctly.
*/
-static inline void *
-alloc_inode_sb(struct super_block *sb, struct kmem_cache *cache, gfp_t gfp)
-{
- return kmem_cache_alloc_lru(cache, &sb->s_inode_lru, gfp);
-}
+#define alloc_inode_sb(_sb, _cache, _gfp) kmem_cache_alloc_lru(_cache, &_sb->s_inode_lru, _gfp)
extern void __insert_inode_hash(struct inode *, unsigned long hashval);
static inline void insert_inode_hash(struct inode *inode)