Unionfs: copyup only if file is being written to
authorErez Zadok <ezk@cs.sunysb.edu>
Wed, 16 Apr 2008 00:22:15 +0000 (20:22 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Wed, 16 Apr 2008 00:22:15 +0000 (20:22 -0400)
commit092304187de48bc14b7124a7591cf24208af05d4
tree07f503c2976e235d5e14a4187c0ab7b4b916ff94
parent429f37a2feb86a535e36672d84cea73b4133836d
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