Depending on what kind of adapter you have, if it's a good one, you can remove the little "spring" (there's a tiny tiny screw attaching it to the adapter ring) and instead dedicate the adapter ring to the lens and then use the lens as a K-Mount lens in a "normal" way. The "lens-lock" wont work though, but in most cases the lens is firmly attached anyway (if not, just put a tiny bit of scotch somewhere on the metal part on the back of the lens that "connects" with the body, and it'll sit just fine.

I have a cpl of M42's that I use for K-mount, and I have one adapter on each (with the spring removed) works like a charm and makes those lenses k-lenses in my world.