diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index ddf5c21cffbc1698620a8c07ee648e82f31aa49c..77042a2e017c94631f6de3d3a270f6e5145dd105 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -1883,6 +1883,8 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, * and pretend the write failed... */ ext3_truncate_failed_direct_write(inode); ret = PTR_ERR(handle); + if (inode->i_nlink) + ext3_orphan_del(NULL, inode); goto out; } if (inode->i_nlink)