DP-350 HDFS-5526 backported from 2.3 for rollback

This fixes hdfs rollback in branch-2.2.0.