Changed direct call to fstat() into a call to do_fstat().