
853 N.E.2d 937 (2006)
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
William Duncan LAND, Defendant-Appellant.
No. 4-05-0593.
Appellate Court of Illinois, Fourth District.
August 9, 2006.
Justice STEIGMANN delivered the opinion of the court:
In June 2005, defendant, William Duncan Land, an Illinois Department of Corrections inmate, filed a petition to vacate judgment under section 2-1401 of the Code of Civil Procedure (735 ILCS 5/2-1401 (West 2004)) and for habeas corpus relief. Later that month, the trial court sua sponte dismissed defendant's petition, upon determining that (1) defendant's sentence is not void and (2) defendant's claims had previously been rejected on direct appeal and in petitions for postconviction relief.
Defendant appeals, arguing that the trial court lacked the authority to summarily dismiss his habeas corpus petition and section 2-1401 petition. We disagree and affirm.

I. BACKGROUND
In July 1991, a jury convicted defendant of three counts of aggravated criminal sexual assault (Ill.Rev.Stat.1989, ch. 38, par. 12-14(b)(1)), for incidents involving his daughter, C.L., who was then seven years old. The trial court later sentenced him to 20 years in prison on each count, with those sentences to be served consecutively. In March 1993, this court affirmed defendant's convictions. People v. Land, 241 Ill.App.3d 1066, 182 Ill.Dec. 476, 609 N.E.2d 1010 (1993).
*938 In April 1994, defendant pro se filed a petition for relief under the Post-Conviction Hearing Act (725 ILCS 5/122-1 through 122-8 (West 1992)). The trial court later dismissed defendant's petition, upon finding it to be frivolous and patently without merit (725 ILCS 5/122-2.1 (West 1994)), and in March 1996, this court affirmed the dismissal (People v. Land, No. 4-94-0980, 278 Ill.App.3d 1157, 232 Ill.Dec. 840, 699 N.E.2d 617 (March 28, 1996) (unpublished order under Supreme Court Rule 23)).
In February 1998, defendant pro se filed a second postconviction petition. In that petition, defendant claimed that his sentence is void because the trial court erroneously imposed consecutive sentences under the belief that it was required to do so under section 5-8-4(a) of the Unified Code of Corrections (Ill.Rev.Stat.1989, ch. 38, par. 1005-8-4(a) (now 730 ILCS 5/5-8-4(a) (West 1996))). The trial court (1) found that defendant had forfeited this claim by failing to raise it either on direct appeal or in his first postconviction petition and (2) dismissed defendant's petition as frivolous and patently without merit (725 ILCS 5/122-2.1 (West 1996)). Defendant appealed, and this court affirmed the dismissal, upon concluding that defendant's sentence was not void. People v. Land, 304 Ill. App.3d 169, 173-74, 237 Ill.Dec. 841, 710 N.E.2d 471, 473-74 (1999).
In June 2005, defendant filed his petition for relief from judgment and habeas corpus relief. In the petition, defendant argued that (1) his sentence is void, (2) this court's 1999 decision was erroneous, and (3) he is entitled to immediate release from prison (based on what he claims his sentence should have been, minus the good-time credit he accrued).
Later in June 2005, the trial court entered a written order sua sponte dismissing defendant's petition. Specifically, the court noted, in pertinent part, that (1) defendant's sentence is not void because it falls within the permissible statutory range and (2) defendant had the opportunity to raise this issue on direct appeal and in two previous postconviction petitions.
This appeal followed.

II. ANALYSIS
Defendant urges this court to (1) reconsider its prior holdings that trial courts have the authority to sua sponte dismiss meritless section 2-1401 petitions and (2) decline to follow the Fifth District's decision in People v. Tiller, 361 Ill.App.3d 803, 805-06, 298 Ill.Dec. 76, 838 N.E.2d 969, 971-72 (2005), holding that trial courts may sua sponte dismiss meritless habeas corpus petitions. We adhere to our prior holdings and agree with the Fifth District.
In Mason v. Snyder, 332 Ill.App.3d 834, 842, 266 Ill.Dec. 351, 774 N.E.2d 457, 464 (2002), this court held that a trial court has the authority to sua sponte dismiss a mandamus petition, upon finding it to be frivolous and patently without merit. In People v. Bramlett, 347 Ill.App.3d 468, 472-73, 282 Ill.Dec. 663, 806 N.E.2d 1251, 1254-55 (2004), we held that trial courts also have authority to summarily dismiss frivolous section 2-1401 petitions, based on the same rationale. In People v. Ryburn, 362 Ill.App.3d 870, 876, 299 Ill.Dec. 281, 841 N.E.2d 1013, 1017-18 (2005), we were asked to reconsider our holding in Bramlett, and we declined to alter our position.
In Tiller, 361 Ill.App.3d at 806, 298 Ill. Dec. 76, 838 N.E.2d at 972, the Fifth District held that trial courts have authority to sua sponte dismiss meritless habeas corpus petitions. In so holding, the Fifth District noted that, like mandamus cases, habeas corpus relief is a very limited and specific form of relief. The court upheld sua sponte dismissal where the defendant's *939 petition for habeas corpus relief challenged the nature of his sentences and failed to raise any claim that he was otherwise entitled to be discharged from prison. Tiller, 361 Ill.App.3d at 806, 298 Ill.Dec. 76, 838 N.E.2d at 972.
We acknowledge that the Second and Third Districts, as well as some divisions of the First District, have disagreed with these holdings. Our sister districts in disagreement have cited the following as their primary rationale: (1) concern for the petitioner's right to amend his pleading and (2) that it is up to the legislature to provide trial courts with such authority. See People v. Coleman, 358 Ill.App.3d 1063, 1069-70, 296 Ill.Dec. 353, 835 N.E.2d 387, 392-93 (2005); People v. Winfrey, 347 Ill. App.3d 987, 989-90, 283 Ill.Dec. 623, 808 N.E.2d 589, 591-92 (2004). We are not persuaded that by recognizing the trial court's inherent authority to sua sponte dismiss patently frivolous mandamus, habeas corpus, and section 2-1401 petitions, we interfere with either the rights of petitioners or the legislature.
By holding that trial courts have the inherent authority to sua sponte dismiss meritless mandamus, habeas corpus, and section 2-1401 petitions, we in no way suggest that trial courts should cease to exercise their discretion in granting petitioners leave to amend their petitions. Instead, we simply acknowledge (1) the trial court's capacity to recognize a frivolous filing and (2) its authority to dispose of such a petition without further expending judicial resources. In Owens v. Snyder, 349 Ill.App.3d 35, 45, 285 Ill.Dec. 251, 811 N.E.2d 738, 747 (2004), the First District recognized that when a petition is completely devoid of merit, no reason exists to require the trial court to do more. In addressing a petitioner's meritless mandamus petition, Justice Wolfson wrote as follows:
"There was nothing plaintiff could do to make it any better. He simply was off the track and could not get back on. We do not believe the legislature intended to require judges and clerks to jump through useless hoops aimed toward impossible goals. * * * This judge apparently saw the plaintiff's complaint for what it wasa totally deficient claim for mandamus relief." Owens, 349 Ill. App.3d at 45, 285 Ill.Dec. 251, 811 N.E.2d at 747.
Presiding Justice O'Malley picked up on this theme in her special concurrence in People v. Anderson, 352 Ill.App.3d 934, 952, 288 Ill.Dec. 350, 817 N.E.2d 1000, 1015 (2004) (O'Malley, P.J., specially concurring), when she wrote: "If the appellate court, based on a cold record and absent input from defendant, could clearly see and appreciate the fatal flaws in defendant's petition, I fail to see why the circuit court should not be trusted to do the same."
We recognize and agree that trial courts should not sua sponte dismiss a mandamus, habeas corpus, or section 2-1401 petition merely because a flaw exists in the pleadings. We further do not suggest that courts should exercise their authority to sua sponte dismiss patently frivolous petitions lightly. Thus, we initially admonished trial courts in Mason to clearly set forth their analysis regarding the deficiencies of a mandamus petition. Mason, 332 Ill.App.3d at 843, 266 Ill.Dec. 351, 774 N.E.2d at 464. The First District echoed these concerns in Owens, when it wrote as follows:
"We hold a trial judge has the inherent authority to dismiss a patently frivolous mandamus complaint before service on the defendant is issued. But we urge trial judges to use this power with caution, especially in cases related to criminal proceedings. We also suggest *940 trial judges give reasons for early dismissals, for the benefit of the losing litigant and for those called on to review trial court orders." Owens, 349 Ill. App.3d at 45, 285 Ill.Dec. 251, 811 N.E.2d at 747.
The holdings of the Second and Third Districts suggest that the hands of the trial courts are tied until the legislature provides a mechanism for disposing of patently frivolous mandamus, habeas corpus, and section 2-1401 petitions. While we would welcome statutory provisions that explicitly provide for the prompt dismissal of such petitions, we fail to see why the resources of the courts and the named respondents should be expended when a petition is hopelessly flawed and the trial court knows it. Allowing a case to proceed when everyone involved knows what the ultimate result will be elevates form over substance and does so to the detriment of everyone involvedexcept for the petitioner, who in many cases is the only participant in this process with an unlimited amount of time on his hands.
We note that section 3-6-3(d) of the Unified Code of Corrections (730 ILCS 5/3-6-3(d) (West 2004)) provides for revocation of an inmate's good-time credit as a penalty for the filing of frivolous lawsuits. Although a "lawsuit" under section 3-6-3(d) includes a postconviction petition and a habeas corpus petition, section 2-1401 petitions are not currently included. There thus does not exist any statutory deterrent for the filing of frivolous section 2-1401 petitions by an inmate. If the trial court lacks the inherent authority to dismiss patently frivolous section 2-1401 petitions, there is nothing to stop a vexatious inmateor some 40,000 of themfrom filing multiple section 2-1401 petitions. In our view, the courts and the respondents should not be required to expend their limited resources responding to such petitions because the legislature has not expressly provided a mechanism for disposing of them.
In sum, we (1) adhere to our prior holdings in Mason, Bramlett, and Ryburn; (2) hold that the trial court had the inherent authority to sua sponte dismiss defendant's patently frivolous habeas corpus petition; and (3) conclude that the court did not err by dismissing defendant's combination habeas corpus-section 2-1401 petition.

III. CONCLUSION
For the reasons stated, we affirm the trial court's judgment.
Affirmed.
McCULLOUGH and KNECHT, JJ., concur.
