Sub-panel with single ground and common bar - with a twist
This is related to what is known as separately derived systems and non separately derived systems, and it concerns avoiding unnecessary impedance on the grounding system that would adversely effect over current protection, i.e., breakers and fuses.  

If the neutral is switched along with the phase conductors in the transfer switch, you have a separately derived system and you would NOT separate the grounds and neutrals in the generator only, which contains the main over current device "main breaker". You WOULD separate the grounds and neutrals in the sub-panel. Again, this is because the main over current device, "main breaker" is contained outside in the generator.

So, in your condition the generator is portable and thus does not fall under the permanently installed generator rules.  But if it were, you would want to separate the grounds and neutrals at the generator and sub panel and be done with it.

To address your main question whether your current setup is safe.  As mentioned above you ideally want the lowest impedance for ground fault protection.  But by not separating the grounds and neutrals in the sub panel you are creating MORE impedance.