From: Erez Zadok Date: Fri, 19 Sep 2008 03:20:58 +0000 (-0400) Subject: Unionfs: don't open unhashed files X-Git-Tag: unionfs-2.5~13 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=49e526b894f764d81b059756ceb7cacf91b62452;p=unionfs-2.6.23.y.git Unionfs: don't open unhashed files Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c index 51f10a23d28..7711f93acf5 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))) {