Unionfs: copyup only if file is being written to
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 17:25:21 +0000 (13:25 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sat, 19 Jul 2008 03:23:00 +0000 (23:23 -0400)
commita8b645db2cb100f22c33356df99afae6f6b4989f
tree75e86eb0372e8de9c6f1cad983897096b389c249
parent7bc719cee38dae088de082be9eaf107c4ccc2a94
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