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>
Wed, 30 Mar 2011 23:21:49 +0000 (19:21 -0400)
commit5ea44b607d8bab7d1e92ffe05ceb1e8e7c345bd3
tree4cce1932da3eb4ac1ccc7902cf4ef38034257d35
parentabf094e16245d02ce4052ae3111b4e9301304c30
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