commit 49e526b894f764d81b059756ceb7cacf91b62452
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Thu Sep 18 23:20:58 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