Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:45:59 +0000 (17:45 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:45:59 +0000 (17:45 -0400)
commitee09d0b135a59327846259dd5e0f00e2d1a094d1
tree6f1dec539b18f261332b56e9ce014ae85bb153d6
parent66e902cc091ac74b37311cbda83c4d84b2cf13ed
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