In my opinion it is better to opt for a spiral lock. You can easily put this in your backpack and use it where necessary. This prevents you from having to mount a frame lock, which not only makes your mountain bike heavier but also looks less attractive.