From 8dd2dcc2030132b68d3631e1a21bc6a25ceb5217 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 19 Sep 2008 18:49:21 -0400 Subject: [PATCH] Unionfs: don't open unhashed files Signed-off-by: Erez Zadok --- fs/unionfs/commonfops.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c index 51f10a23d28..16b8b3caf94 100644 --- a/fs/unionfs/commonfops.c +++ b/fs/unionfs/commonfops.c @@ -601,6 +601,15 @@ int unionfs_open(struct inode *inode, struct file *file) goto out_nofree; } +#if 0 +#error this code is needed for 2.6.19 and newer, but breaks 2.6.18 + /* don't open unhashed/deleted files */ + if (d_deleted(dentry)) { + err = -ENOENT; + goto out_nofree; + } +#endif + file->private_data = kzalloc(sizeof(struct unionfs_file_info), GFP_KERNEL); if (unlikely(!UNIONFS_F(file))) { -- 2.43.0