Question re LOC & Shares

I've got an amount drawn down on a LOC, this is all in the share market and I'm well up. I'm thinking about taking some profit to use to pay last years tax bill and maybe knock a bit off the PPOR mortgage. Am I able to do this without affecting the deductibility of the interest on the LOC?

e.g. say I've drawn 60k, bought shares and now they are worth 80k, can I sell 10k worth of shares and use the proceeds for personal purposes? Still leaves shares in the market worth more than the LOC, but really the profits came from the LOC so unsure whether I would be obliged to pay it down with any proceeds of sale...

Hope this makes sense :)