A major section of South Yorkshire’s motorway has been closed because of flooding.