Unionfs: maintain one-open-file invariant for non-directories
authorErez Zadok <ezk@cs.sunysb.edu>
Wed, 23 Apr 2008 23:33:18 +0000 (19:33 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Wed, 23 Apr 2008 23:33:18 +0000 (19:33 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c

index c246f67760a80b9a5ac1165acc8da135562042c4..8a75790646748c990da543ff45ecd8602c2fbf9d 100644 (file)
@@ -286,6 +286,8 @@ static int do_delayed_copyup(struct file *file)
                        dput(unionfs_lower_dentry_idx(dentry, bindex));
                        unionfs_set_lower_dentry_idx(dentry, bindex, NULL);
                }
+               /* regular files have only one open lower file */
+               fbend(file) = fbstart(file);
        }
        /* for reg file, we only open it "once" */
        fbend(file) = fbstart(file);