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>
Sat, 23 Nov 2013 01:08:50 +0000 (20:08 -0500)
commit7085bb4a9dfc84daebd72c489ee99039f3e77825
tree3ab58c403a48c9df544a3e6fa8632ca2a0c82aaf
parent2bc8e7fc077ca7234820475402eed92964495a84
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