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, 6 Aug 2010 03:01:26 +0000 (23:01 -0400)
commit9dca6697600c010a267c464afcc789d3f4da2e69
tree3c52fb6942c82d94d0e0adbb410ff1dff0ecb4f8
parent0be4a2a3bfa504e0590226c44b7e01af0814502b
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