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)
commitc0b4548d2c0ec2a7ad7de6d4cc6ff11d78a43ff1
tree2208c72f221248fc3ccad1d59ddae6b7d5f3d0b1
parent311062f95b6c07f337ce71fce4a83c837bfbaffc
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