From ad5cbabfc320ea4f024b125ba815b6d8c605521f Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Mon, 5 Sep 2011 21:39:56 -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.34.1