Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:46:00 +0000 (17:46 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:46:00 +0000 (17:46 -0400)
commit529ad2c12e28b2c3ad852473942ac27124200c46
treec56ea2147d56b35105f587ea0268bc83c68fefef
parent88921156f86e25f4af91dafbe56ed90ceb9d7fcc
Unionfs: handle an open-unlink-ftruncate sequence

If someone calls open(), then unlink(), then ftruncate() on a file (rare,
but possible), then it's possible for unionfs to get an unlinked inode which
doesn't have an inode->i_sb and its inode->i_ino is zero.  Don't oops in
that case.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/inode.c
fs/unionfs/union.h