Fix negative calculation of the tmpfs for devices with few RAM (#3557)