ringfs_scan: fix write head detection