From: Erez Zadok Date: Thu, 11 Sep 2008 03:41:10 +0000 (-0400) Subject: Unionfs: add a few more invariant debugging checks X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=b53959e9922049081c165a69b48479d1aea7dd47;p=unionfs-2.6.39.y.git Unionfs: add a few more invariant debugging checks Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/dirfops.c b/fs/unionfs/dirfops.c index 14ca7d3aa5d..7c44d098dd5 100644 --- a/fs/unionfs/dirfops.c +++ b/fs/unionfs/dirfops.c @@ -187,6 +187,8 @@ static int unionfs_readdir(struct file *file, void *dirent, filldir_t filldir) } out: + if (!err) + unionfs_check_file(file); unionfs_unlock_dentry(dentry); unionfs_read_unlock(dentry->d_sb); return err; @@ -270,6 +272,8 @@ static loff_t unionfs_dir_llseek(struct file *file, loff_t offset, int origin) } out: + if (!err) + unionfs_check_file(file); unionfs_unlock_dentry(dentry); unionfs_read_unlock(dentry->d_sb); return err; diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c index fb236cdc728..d711e9de80d 100644 --- a/fs/unionfs/unlink.c +++ b/fs/unionfs/unlink.c @@ -267,6 +267,8 @@ out: d_drop(dentry); /* update our lower vfsmnts, in case a copyup took place */ unionfs_postcopyup_setmnt(dentry); + unionfs_check_dentry(dentry); + unionfs_check_inode(dir); } if (namelist)