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)
commit9b248569b5ec37d3961f62651062fbb859178e0f
tree1b685551bc50995d4726114d74cb95a816f71e47
parent41ba6507f60e9d8129e82bce0098fbc4b8aa155f
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