From e0761ce57e3a0b28b0a37a6140e46ae0a74906f6 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 19 Sep 2008 19:26:55 -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 aebe3c399db..a3c9afa8b0c 100644 --- a/fs/unionfs/dirfops.c +++ b/fs/unionfs/dirfops.c @@ -186,6 +186,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; @@ -269,6 +271,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