From 5544aa932b98d8ca0541ba069d2cdb37a9ac55aa Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Mon, 5 Sep 2011 21:34:41 -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 1301074407e..b154ccc95e1 100644 --- a/fs/unionfs/commonfops.c +++ b/fs/unionfs/commonfops.c @@ -505,8 +505,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