Skip to content

Commit 3eb7e95

Browse files
mjguzikbrauner
authored andcommitted
vfs: use the new debug macros in inode_set_cached_link()
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20250209185523.745956-4-mjguzik@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent af153bb commit 3eb7e95

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/fs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ struct inode {
792792

793793
static inline void inode_set_cached_link(struct inode *inode, char *link, int linklen)
794794
{
795+
VFS_WARN_ON_INODE(strlen(link) != linklen, inode);
796+
VFS_WARN_ON_INODE(inode->i_opflags & IOP_CACHED_LINK, inode);
795797
inode->i_link = link;
796798
inode->i_linklen = linklen;
797799
inode->i_opflags |= IOP_CACHED_LINK;

0 commit comments

Comments
 (0)