From 7d9c3081c2a44dc0ab2468d0d0122cde1711cdac Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Tue, 22 May 2007 23:49:35 -0400 Subject: [PATCH] debugging: test for freed (0x5a) inodes Signed-off-by: Erez Zadok --- fs/unionfs/debug.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c index ba33b483f5be..821ef6532388 100644 --- a/fs/unionfs/debug.c +++ b/fs/unionfs/debug.c @@ -84,6 +84,10 @@ void __unionfs_check_inode(const struct inode *inode, PRINT_CALLER; printk(" Ci5: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n", inode, lower_inode, bindex, istart, iend); + } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed inode! */ + PRINT_CALLER; + printk(" Ci6: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n", + inode, lower_inode, bindex, istart, iend); } } else { /* lower_inode == NULL */ if (bindex >= istart && bindex <= iend) { @@ -93,7 +97,7 @@ void __unionfs_check_inode(const struct inode *inode, */ if (!(S_ISDIR(inode->i_mode) && bindex > istart && bindex < iend)) { PRINT_CALLER; - printk(" Ci6: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n", + printk(" Ci7: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n", inode, lower_inode, bindex, istart, iend); } } @@ -227,6 +231,10 @@ void __unionfs_check_dentry(const struct dentry *dentry, PRINT_CALLER; printk(" CI5: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n", dentry, lower_inode, bindex, istart, iend); + } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed inode! */ + PRINT_CALLER; + printk(" CI6: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n", + dentry, lower_inode, bindex, istart, iend); } } else { /* lower_inode == NULL */ if (bindex >= istart && bindex <= iend) { @@ -236,7 +244,7 @@ void __unionfs_check_dentry(const struct dentry *dentry, */ if (!(S_ISDIR(inode->i_mode) && bindex > istart && bindex < iend)) { PRINT_CALLER; - printk(" CI6: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n", + printk(" CI7: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n", dentry, lower_inode, bindex, istart, iend); } } -- 2.43.0