diff options
author | Mateusz Guzik <mjguzik@gmail.com> | 2025-02-09 19:55:20 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-02-21 10:23:53 +0100 |
commit | 8b17e540969a0983abe96ffc352397890ab67bf1 (patch) | |
tree | 9bb0f153070348ba36edb863e3ff498d115b780f /fs/inode.c | |
parent | 2014c95afecee3e76ca4a56956a936e23283f05b (diff) |
vfs: add initial support for CONFIG_DEBUG_VFS
Small collection of macros taken from mmdebug.h
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://lore.kernel.org/r/20250209185523.745956-2-mjguzik@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/inode.c b/fs/inode.c index 5587aabdaa5e..875e66261f06 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2953,3 +2953,18 @@ umode_t mode_strip_sgid(struct mnt_idmap *idmap, return mode & ~S_ISGID; } EXPORT_SYMBOL(mode_strip_sgid); + +#ifdef CONFIG_DEBUG_VFS +/* + * Dump an inode. + * + * TODO: add a proper inode dumping routine, this is a stub to get debug off the + * ground. + */ +void dump_inode(struct inode *inode, const char *reason) +{ + pr_warn("%s encountered for inode %px", reason, inode); +} + +EXPORT_SYMBOL(dump_inode); +#endif |