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>
Wed, 6 Jan 2010 03:44:50 +0000 (22:44 -0500)
commit67cfe510ec39d22e75f2811a2e5cd3272947ad0c
tree8956594e9c78c32779062a0705d27f558c5e68de
parent21074f3e7f776e82b6e1fc8d13928f40c5a88b68
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