From: Erez Zadok Date: Wed, 23 May 2007 03:49:35 +0000 (-0400) Subject: debugging: test for freed (0x5a) inodes X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=a3bc65cbcee0c49cf92a99dfd2ae72fea2e2014e;p=unionfs-lite.git debugging: test for freed (0x5a) inodes Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c index ba33b483f5b..821ef653238 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); } }