Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 20:58:04 +0000 (16:58 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Wed, 6 Jan 2010 03:45:19 +0000 (22:45 -0500)
commit6f4262954dc406695da3c354f31cb20ee87e9e74
tree0ee78a230014d75f14454d4eaafcac1c0f597ddc
parent119c5fdbb2855556e014c51063b7612062e3bc53
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