patch: Simplify the mount and mount_all code