commit 85e0503b93e3130c42124683ace689e2674e3cc6
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Fri Sep 19 01:08:11 2008 -0400

    Unionfs: don't open unhashed files
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
index 51f10a2..7711f93 100644
--- a/fs/unionfs/commonfops.c
+++ b/fs/unionfs/commonfops.c
@@ -601,6 +601,12 @@ int unionfs_open(struct inode *inode, struct file *file)
                goto out_nofree;
        }
 
+       /* don't open unhashed/deleted files */
+       if (d_deleted(dentry)) {
+               err = -ENOENT;
+               goto out_nofree;
+       }
+
        file->private_data =
                kzalloc(sizeof(struct unionfs_file_info), GFP_KERNEL);
        if (unlikely(!UNIONFS_F(file))) {
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to