Unionfs: copyup only if file is being written to
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 17:11:04 +0000 (13:11 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 29 Apr 2011 02:26:14 +0000 (22:26 -0400)
commit8ef13b14a20b54ecc94f724417e749e983bdda18
tree3368a688e33bc1c18343dade2d0165074213f224
parent9a80ee29be4c5fd882b3062703ccf26a67fa787b
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