Unionfs: handle an open-unlink-ftruncate sequence
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 22 Sep 2009 21:46:01 +0000 (17:46 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 22 Nov 2013 23:56:16 +0000 (18:56 -0500)
commit4a4c4c29de45142f0d7c8afa571880d7f08376d5
treef086df7a23daeb90b75883b5b6071192b2d89271
parent32b3f8330fe050397a5002022322c62228e30406
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