Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:27:30 +0000 (17:27 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sat, 16 Aug 2014 02:31:00 +0000 (22:31 -0400)
commit27e23a5b56dcb8524ba754eb505a241731bca76e
treec55efffe818ef62a22f5f5aef5b5c26eaf4fb6a0
parentfd06fb3921e74b82bacfd948fbcd63474f74615c
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