Unionfs: force only one open lower file after copyup in open(2)
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 6 Sep 2011 04:02:49 +0000 (00:02 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 20 Jun 2014 00:42:15 +0000 (20:42 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c

index 9ae2e618ce81e172a48aa90c28ae909426024cbf..0d2146cc81673252890c81ab7225f6fde00e55aa 100644 (file)
@@ -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 {