Unionfs: force only one open lower file after copyup in open(2)
authorErez Zadok <ezk@cs.sunysb.edu>
Sat, 30 Apr 2011 05:33:57 +0000 (01:33 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 12 Aug 2011 02:39:32 +0000 (22:39 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c

index 77ddfe4632c888acc199e8cb9561f3e1d0c80a4c..0f6cba3c8006f669fc400646e3ac824cfa0d7ce4 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 {