Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:46:00 +0000 (17:46 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:46:00 +0000 (17:46 -0400)
commitd463f7066f3d3c1aaef33d7b4a67b1506cb9289a
treea6dcf918202800190e7e93b69ddc608b02e0227b
parentdd70bf7cf99a7d583bf1525780eeda60ea4f7b97
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