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>
Fri, 20 Jun 2014 00:42:08 +0000 (20:42 -0400)
commita163353b9d0dcf7615e31e7919d9b6eea234f041
tree0bba8de9fa2b6098f360389e7ef64ad402818942
parent6408c20218878620757529f70bb7e20562930c1f
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