Unionfs: copyup only if file is being written to
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 17:26:15 +0000 (13:26 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 17:26:15 +0000 (13:26 -0400)
commitc01b130d2d2665b3b92a120335c3acca7a4b7fd2
treeac3ec42e94cb8a7a5c26896710ff1491b2dbbbb4
parent7b39c8dfba173646e36fa5d1e8563b07105cd08b
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