From: Erez Zadok Date: Tue, 26 Aug 2008 19:07:49 +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=4b37b26519b07adfe5e2dbabf8ef062cd3d8c2db;p=unionfs-2.6.31.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))) {