From: Erez Zadok Date: Tue, 26 Aug 2008 19:07:49 +0000 (-0400) Subject: Unionfs: don't open unhashed files X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=6135434f249d8a18f482f9d2bdabf5601de5afdf;p=unionfs-3.11.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))) {