Unionfs: copyup only if file is being written to
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 23:08:44 +0000 (19:08 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 23:08:44 +0000 (19:08 -0400)
commite6a3fc9e10333dc52dfcd7386d436ecf925f6617
treedf39d42addf478ede5f20e903941cba186c6edd0
parent10778b6f44a6955634433dd82a703d88a6bc7a4f
Unionfs: copyup only if file is being written to

Before, we used to copyup on an open(2) call which used flags implying
writing (O_RDWR, O_WRONLY, O_APPEND).  This meant that a file being opened
for writing, then immediately closed (without actually writing to the file),
will still have been copied up.  Now, we don't copyup such files in ->open,
but defer the copyup till later. [Bug #591].

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c
fs/unionfs/file.c
fs/unionfs/union.h