Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:03:53 +0000 (17:03 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 6 Aug 2010 03:01:39 +0000 (23:01 -0400)
commit068b351a431d1afa60f346fadcd4c8a04ea211c2
tree99f2defaff2d6c2d56414fed20498f721a6813ed
parent52e2e3f75b52f09dff09b9daea0ffc707d9885da
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