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>
Tue, 11 Nov 2014 02:50:52 +0000 (21:50 -0500)
commit13224e90713b0036d621b263ae177cdad518c62c
tree17956d467db7747148056f11cdd909eeeb032d1f
parent63833d515b68e26ad4c3a5bed3a1a1af5e30d530
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