From b53959e9922049081c165a69b48479d1aea7dd47 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Wed, 10 Sep 2008 23:41:10 -0400 Subject: [PATCH] Unionfs: add a few more invariant debugging checks Signed-off-by: Erez Zadok --- fs/unionfs/dirfops.c | 4 ++++ fs/unionfs/unlink.c | 2 ++ 2 files changed, 6 insertions(+) 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) -- 2.34.1