From: Erez Zadok Date: Fri, 18 May 2007 05:53:12 +0000 (-0400) Subject: bug fix: don't revalidate dropped dentries X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=54c827bd2020c4a97b853eb3634c78652ff93b17;p=unionfs-3.12.y.git bug fix: don't revalidate dropped dentries This fixes a harmless but annoying message that unionfs prints if a dropped dentry is being revalidated, which could happen if you unlink open files. --- diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c index ab92cac1007a..519dbf0377d6 100644 --- a/fs/unionfs/commonfops.c +++ b/fs/unionfs/commonfops.c @@ -331,9 +331,12 @@ int unionfs_file_revalidate(struct file *file, int willwrite) unionfs_lock_dentry(dentry); sb = dentry->d_sb; - /* first revalidate the dentry inside struct file */ - if (!__unionfs_d_revalidate_chain(dentry, NULL) && - !d_deleted(dentry)) { + /* + * First revalidate the dentry inside struct file, + * but not unhashed dentries. + */ + if (!d_deleted(dentry) && + !__unionfs_d_revalidate_chain(dentry, NULL)) { err = -ESTALE; goto out_nofree; }