
558 F.3d 680 (2009)
UNITED STATES of America, Plaintiff-Appellee,
v.
Ronald J. RICHARDSON, Defendant-Appellant.
No. 08-1243.
United States Court of Appeals, Seventh Circuit.
Argued January 27, 2009.
Decided March 12, 2009.
Debra Riggs Bonamici (argued), Office of the United States Attorney, Chicago, IL, for Plaintiff-Appellee.
Terence F. MacCarthy, John F. Murphy (argued), Office of the Federal Defender Program, Chicago, IL, for Defendant-Appellant.
Before POSNER, ROVNER, and WILLIAMS, Circuit Judges.
POSNER, Circuit Judge.
After being convicted of a variety of financial crimes and sentenced to 140 months in prison, Ronald Richardson assisted the government in an unrelated prosecution. The government offered to submit a motion to the sentencing judge under Fed.R.Crim.P. 35(b), asking the *681 judge to reduce the length of the sentence by 15 percent on the basis of Richardson's assistance, but only if Richardson agreed to withdraw his appeal from his conviction, which was pending. He refused, and, still within a year of his having been sentenced, filed his own Rule 35(b) motion, complaining that the government's refusal to file such a motion on his behalf had been unreasonable, since the assistance he had provided the prosecution in the other case was, according to one prosecutor, "remarkable." After we affirmed Richardson's conviction in United States v. Ghilarducci, 480 F.3d 542 (7th Cir.2007), the judge dismissed the Rule 35(b) motion for want of jurisdiction, precipitating this appeal from the dismissal.
Rule 35(b) authorizes a reduction in the length of a defendant's sentence (provided the reduction is sought within a year), on the ground of "substantial assistance in investigating or prosecuting another person," "upon the government's motion." The government made no such motion. Richardson is not the government, and the question (or rather the first question) that the appeal presents is whether, though he cannot file a Rule 35(b) motion, he can challenge the government's refusal to file such a motioncan, in other words, file a motion to compel the government to file a Rule 35(b) motion.
The argument that he can is based on the following language in Wade v. United States, 504 U.S. 181, 185-86, 112 S.Ct. 1840, 118 L.Ed.2d 524 (1992): "federal district courts have authority to review a prosecutor's refusal to file a substantial-assistance motion and to grant a remedy if they find that the refusal was based on an unconstitutional motive" or "was not rationally related to any legitimate Government end." But the motion in Wade was not a motion to reduce sentence, a motion authorized by Rule 35(b), but instead was a motion under section 5K1.1 and 18 U.S.C. § 3553(e), a motion made before sentencing. A sentence of course is appealable (unless the defendant has waived his right to appeal, or forfeited it by delay beyond the deadline for appealing), and on appeal the defendant can challenge it on whatever ground might be available, such as an improper refusal by the government to have asked the judge for a lighter sentence because of the assistance that the defendant had given. But once the defendant has been sentenced, the district court can revise the sentence (so far as bears on this case) only "to the extent ... expressly permitted by ... Rule 35," 18 U.S.C. § 3582(c), and that express permission is limited to making revisions in response to a motion by the government.
It is true that in United States v. Wilson, 390 F.3d 1003 (7th Cir.2005), we reviewedand reversedthe denial by the district court of a motion to compel the government to file a Rule 35(b) motion. But the opinion does not discuss why Rule 35, rather than, as we are about to see, 28 U.S.C. § 2255, is the right procedural vehicle, and the absence of any discussion means that there is no holding on the point that might bind us in this case. See Pennhurst State School & Hospital v. Halderman, 465 U.S. 89, 119, 104 S.Ct. 900, 79 L.Ed.2d 67 (1984); Hagans v. Lavine, 415 U.S. 528, 533 n. 5, 94 S.Ct. 1372, 39 L.Ed.2d 577 (1974); Jezierski v. Mukasey, 543 F.3d 886, 888 (7th Cir.2008).
This does not end the appeal, however, because, as we have just intimated, Richardson's motion to compel the government to file a Rule 35(b) motion can be construed as a collateral attack on his sentence under 28 U.S.C. § 2255. If the government's refusal to file the motion unless he waived his right to appeal his conviction deprived him of liberty without due process of lawwhich it did if, in the Supreme Court's words in Wade, the government's *682 action "was not rationally related to any legitimate Government end"then the sentence cannot stand even though Richardson mislabeled his motion.
He concedes that a waiver of the right to appealthe concession the government insisted onis valid; it is little different from a defendant's agreeing to plead guilty, which entails a waiver of his right to a trial, and to an appeal if he loses at the trial. The question is whether making the waiver a condition of the government's agreeing to file a motion for a reduction of sentence can be said to be "rationally related to any legitimate Government end." The answer is yes. United States v. Newson, 515 F.3d 374, 378 (5th Cir.2008); United States v. Beatty, 538 F.3d 8, 16 (1st Cir.2008); United States v. Blanco, 466 F.3d 916, 918-19 (10th Cir. 2006). The government doesn't have to reward criminals who cooperate with it with a lighter sentence, Wade v. United States, supra, 504 U.S. at 185, 112 S.Ct. 1840, and since it doesn't have to, it can bargain with them, seeking concessions that need only be rationally related to some legitimate governmental end. Getting a defendant to abandon a challenge to his conviction is a legitimate such end, as it secures the conviction and spares the government the time and expense of defending an appeal.
Our opinion in Wilson noted that a concession on which the government insists need not be directly related to the defendant's providing assistance to the government in prosecuting or investigating. 390 F.3d at 1010; see also United States v. Duncan, 242 F.3d 940, 949 (10th Cir. 2001); United States v. Butler, 272 F.3d 683, 687 (4th Cir.2001). The government was willing to ask for a 15 percent sentencing discount for Richardson, but it wanted to make sure that he would serve the 85 percent, rather than perhaps succeed in knocking out the sentence, in whole or part, on appeal.
Richardson argues that Wilson, which held that the concession on which the government conditioned filing a Rule 35(b) motion was not rationally related to a legitimate governmental end, is indistinguishable from this case. But it is not. In that case the defendant discovered that by mistake he had been imprisoned for a previous crime for two additional years, and he considered filing a civil suit seeking redress for the mistake. (Later he did file a suit, against a warden, the Bureau of Prisons, and others, under the tort claims act and Bivens; it was eventually dismissed.) The government refused to file a Rule 35(b) motion unless the defendant agreed not to sue. Although heading off civil litigation is a legitimate government end, it has nothing to do with prosecution, and some connection with prosecution, however indirect, might be thought an implicit qualification of "any" legitimate governmental end. United States v. Wilson, supra, 390 F.3d at 1010; United States v. Duncan, supra, 242 F.3d at 949. Otherwise the government could condition the filing of a Rule 35(b) motion on the defendant's agreeing to join the army or to forgo commissary privileges.
This case is different. The defendant wanted a lower sentence; the government wanted him to accept the sentence rather than challenge it on appeal. That was a reasonable condition. Any doubt on that score is dispelled by Town of Newton v. Rumery, 480 U.S. 386, 107 S.Ct. 1187, 94 L.Ed.2d 405 (1987), which upheld a deal by which criminal charges were dropped in exchange for the defendant's agreeing not to bring a civil rights suit challenging his arrest. See also Dye v. Wargo, 253 F.3d 296, 301-02 (7th Cir.2001). Rumery was like any other case in which the contenders, having colorable claims against each *683 other, agree by way of settlement to drop both.
So insofar as it challenges the district court's refusal to compel the government to file a Rule 35(b) motion, the appeal is dismissed; insofar as it challenges the legality of the sentence because of the government's failure to file such a motion, it is affirmed.
