From 7e2e9403dd3aaa2c4e6f6da0ff626969718aa68c Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Tue, 6 Sep 2011 00:10:42 -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 9ae2e618ce8..0d2146cc816 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.43.0