actually it was invert ,there are two ways to do it
jo selection hai image ka usko ulta(invert) krna hai by pressing ctrl shift i and then masking krni hai
or dusra easy way hai,
Jab aap masking k icon per click krr rhe ho to just press ALT, iske karn masking invert hoke apply hogi.
Just go ahead make a selection on any image, select small portion and then click on masking first without pressing alt and then with pressing alt and see for yourself what happens. Bus alt daba krr mouse click krna hai on "Add Layer Mask" icon.