The way you handled it does technically fulfill the "worse outcome" choice for the GM.

However, you ended up in the same situation you were in before. Nothing changed. The PC is still on the wrong side of the Troll they wanted to get past, and neither the PC's nor the Troll's state has changed for the better or worse (from what you describe, at least).

Not moving the fiction forward as a result of a Move is deeply against the core spirit of the Dungeon World rules. Actually, with that you just violated (at least!) a point of your GM agenda, and one of your GM principles:

 - *Fill the character's lives with adventure* 
 - *Think dangerous*

Also, you didn't use any of your Moves from the GM Moves list, which you always do when everyone looks to you to see what happens. Moreover, and I think this is the **key point** for the answer to your question, they do look at you to see what kind of *worse outcome, hard bargain, or ugly choice* you will offer them! This means you will **make a GM move that represents a *worse outcome, hard bargain, or ugly choice***, probably a soft move, as it was a partial success, but depending on the circumstances it could already be a hard move.

You could *show signs of an approaching threat*: "While you try to rush past the Troll, it swings its big club towards you, but you manage to duck below it at the last moment. The club hits the wall right beside you, and a crack now runs form the wall to the ceiling, rocks starting to come loose. It will only be moments before the tunnel collapses and you are lying flat on your stomach. What do you do?"

You could *offer an opportunity, with or without cost*: "As you sprint towards the Troll to get past it, it smashed down its club right onto you. At the last moment, you take a final leap forward to dodge the blow, but fumble your landing roll and come to a stop on your back, right below the creature's private parts. You have a moment to think about your situation, as the Troll gathers that it must have missed, since there's no red mush on its club. What do you do?

You could *put someone in a spot*: "You sprint toward the Troll, sliding deftly between its legs to the other side. The troll whirls around in anger looking for you, but instead spots Gareth, the Thief, who was just preparing for a stealth attack from behind. Gareth, as your position is now compromised and you have the full attention of an angry Troll no more than a Troll's arm reach away from you, what do you do?"

You could *reveal an unwelcome truth*: "As you try to rush past the Troll, you realise it is much more nimble than you though, deftly blocking any path you try to take with its club, swapping it from side to side as needed. This is obviously not your run-of-the mill brainless Troll, and that's only the lowly front guard of this cave full of Trolls! Finally you manage to get past it, but as you turn around you see the Troll has picked up a boulder twice the size of your head, preparing to hurl it your way. What do you do?"

You could, as a hard move that follows from previously established fiction, *deal damage*: "As you already realised the last time you tried to dodge past a Troll in this cave, these are really nimble and skilled Trolls! Still, you need to get past this one to reach the lever, so you take all your courage and sprint off. You might have expected it, but you didn't see it coming. The Troll realises what you want to do and swaps its club to the other hand, making a swift strike at your back as you sprint past it. The force of the blow hurls you forward a couple dozen ropelengths and you would have felt your spine shattering, were it not for your heavy duty sleeping bag that you packed for this cold climate protecting your back. Take 1d10 damage, ignoring armor, and the *Shaky* debility, because that blow really shook you up. You are now flat on your stomach within arm's reach of the lever you wanted to reach. What do you do?"