Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Mon, 3 Aug 2009 23:54:02 +0000 (19:54 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 3 Aug 2009 23:54:02 +0000 (19:54 -0400)
commit408d0cbf3ce139333e7e9667cfd740ee9870e06d
tree6565830d85e8ef16a723b0b197205b8c83583638
parent081fd14d7db5eae7190cbfc9d60396fdf09895c4
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