Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:27:30 +0000 (17:27 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 6 Mar 2011 08:43:28 +0000 (03:43 -0500)
commit4f33f74506a58740b012f976f5ae441eb3a49451
tree816d9b7f9b3eeeb3154d1ca3e5239764cd0a56ec
parent472b3e59f130cbe4cea49c40ee6f2608eafef839
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