In general
If all gain or loss realized on such disposition is recognized, the excess of—
(i)#
any loss from such activity for such taxable year (determined after the application of subsection (b)), over
(ii)#
any net income or gain for such taxable year from all other passive activities (determined after the application of subsection (b)),
shall be treated as a loss which is not from a passive activity.