From ec222f724a91602fedb4a764051cbade7e94002c Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Sat, 30 Apr 2011 01:33:57 -0400 Subject: [PATCH] Unionfs: force only one open lower file after copyup in open(2) Signed-off-by: Erez Zadok --- fs/unionfs/commonfops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c index 77ddfe4632c..0f6cba3c800 100644 --- a/fs/unionfs/commonfops.c +++ b/fs/unionfs/commonfops.c @@ -506,8 +506,11 @@ static int __open_file(struct inode *inode, struct file *file, for (bindex = bstart - 1; bindex >= 0; bindex--) { err = copyup_file(parent->d_inode, file, bstart, bindex, size); - if (!err) + if (!err) { + /* only one regular file open */ + fbend(file) = fbstart(file); break; + } } return err; } else { -- 2.34.1