Are you familiar with the anatomy of the gallbladder/liver/bile duct? Dilute bile is produced in the liver, released into the bile ducts down to the ampulla of Vader, and out to the duodenum. The ampulla is a sphincter that can be constricted or relaxed. When it is constricted, the bile can ascend into the gallbladder where it is stored and concentrated.
Cholelithiasis - presence of gallstones in the gallbladder, can cause considerable discomfort. However, liver function is not affected because bile from the liver can still flow to the ampulla.
Choledocholithiasis - presence of gallstones in the common bile duct with obstruction of the outflow tract. Liver damage occurs: e.g., Jaundice, fibrosis.