scoutfs_write_begin() was riddled with lock ordering and cleanup bugs:
- blocked holding the trans with the page lock held
- dirtied the inode with the page lock held
- didn't release the trans on error
- tried to double unlock and release pages on readpage error
We fix all this up by reordering things so we hold the trans, dirty the
inode, then work pages all while more carefully cleaning up.
Signed-off-by: Zach Brown <zab@versity.com>
Reviewed-by: Mark Fasheh <mfasheh@versity.com>