shouldn't this be min()?  i'm assuming max_fs is telling the caller how much they are allowed to write to?