bug fix: don't revalidate dropped dentries
authorErez Zadok <ezk@bigvaio.(none)>
Fri, 18 May 2007 05:53:12 +0000 (01:53 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 12 Jan 2009 23:20:26 +0000 (18:20 -0500)
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.

fs/unionfs/commonfops.c

index ab92cac1007afda930d29eaac0343424f9227839..519dbf0377d66d27860f0434b0579109ad4745e2 100644 (file)
@@ -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;
        }