(2)If any person making an inspection under section 176 finds the provisions or water to be of bad quality and unfit for use or deficient in quantity, he shall signify it in writing to the master of the ship and may, if he thinks fit, detain the ship until the defects are remedied to his satisfaction.