GIT: unionfs2-2.6.27.y: Unionfs: don't open unhashed files
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:18:08 EDT 2010
commit 2450e18a2b97d7ba3e9a5bda963e7297fe17a662
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date: Tue Aug 26 15:07:49 2008 -0400
Unionfs: don't open unhashed files
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
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))) {
More information about the unionfs-cvs
mailing list