Although thats is the recommended solution, but for those who are jailbroken already using the delete all content settings on the the phone will usually put it in a non-stop loop cycle.
Now all i bought my iphone 4 may 14th 2012 and was all stock i updated to 5.1.1 a fee days after. Then when Absinthe 2.0 came out, all i did was backed up, made sure the encrypted password was off in itunes for the backup and when Absinthe was to run. Then i ran Absinthe as Administator to jailbreak. Absinthe will do a backup as well when it runs.
It took about 5 min to do.
And i note: I never retored the phone as it was all there jailbroken and all so need for the restore for me as i had nothing on it anyways.
Now for those who have a ton of stuff you can do so this way too as i did, but like noted by me and others it will take a lot longer = some its taken 30 min or more. So its best to backup, restore like new and jailbreak, then restore your stuff.
If jailbroken before this, then make sure to backup your cydia apps before setting up as new device.