
902 P.2d 1007 (1995)
Randall Mark RUDOLPH, Petitioner,
v.
Rick DAY, Administrator, Department of Corrections, Respondent.
No. 95-281.
Supreme Court of Montana.
Decided August 29, 1995.

ORDER
Randall Mark Rudolph (Rudolph), pro se, has filed herein his petition for writ of habeas corpus. The Attorney General of the State of Montana and legal counsel for the Department of Corrections has responded on behalf of the State.
In October 1987, Rudolph was convicted after a jury trial, of robbery and sentenced to a term of years at the Montana State Hospital in lieu of prison incarceration. Rudolph was designated a dangerous offender for purposes of parole eligibility. We denied his petition for writ of habeas corpus pending appeal on February 14, 1989, and subsequently confirmed his conviction on direct appeal. State v. Rudolph (1989), 238 Mont. *1008 135, 777 P.2d 296. Rudolph's petition for federal habeas corpus relief was subsequently denied by both the United States District Court and the United States Court of Appeals for the Ninth Circuit. His motion to reconsider was denied by the United States District Court.
Eight years following his conviction, on June 8, 1995, Rudolph filed in this Court the instant petition for writ of habeas corpus. In that petition Rudolph raises three issues:
1. denial of effective assistance of counsel for failure to examine the issue of the show-up identification procedure in light of Stovall v. Denno (1967), 388 U.S. 293;
2. the show-up identification procedure was impermissibly suggestive; and
3. his good time credit was improperly calculated.
At the outset we note that the issue of the pretrial identification procedure was discussed in detail in our opinion on Rudolph's direct appeal. Rudolph, 777 P.2d at 298-300. Moreover, in denying Rudolph's motion for reconsideration on April 30, 1994, the United States District Court stated that the Stovall opinion was obviously available to all of the parties during the original proceedings and that it was, in any event, not the leading case on the point of law at issue  the show-up identification procedure.
A petition for writ of habeas corpus may be filed to inquire into the cause of imprisonment or restraint. Section 46-22-101, MCA. While habeas corpus is available to determine the legality or illegality of the restraint alleged, Wells v. Stagner (1949), 123 Mont. 26, 31, 207 P.2d 549, 551, the writ is not available to attack the validity of the conviction or sentence of a person who has been adjudged guilty of an offense in a court of record, and who has exhausted his remedy of appeal. Section 46-22-101(2), MCA; Duncan v. State (1990), 243 Mont. 232, 233, 794 P.2d 331, 332.
Issues 1 and 2 in Rudolph's petition challenge the validity of his conviction and sentence. It is clear that he has been adjudged guilty of an offense in a court of record and, also, that he has exhausted his remedy on appeal. Accordingly, Rudolph's petition for writ of habeas corpus is barred and is appropriately dismissed. Section 46-22-101(2), MCA.
Notwithstanding that Rudolph's petition for writ of habeas corpus is specifically barred by statute, we may nevertheless treat his petition as one for post conviction relief. Tecca v. McCormick (1990), 246 Mont. 317, 318, 806 P.2d 11, 12. In doing so, however, we conclude that Rudolph's claims are untimely. Section 46-21-102, MCA, provides that a petition for post conviction relief "may be filed at any time within five years of the date of conviction." In this case, Rudolph was convicted in 1987 and accordingly, his June 8, 1995 petition for post conviction relief is clearly time-barred under § 46-21-102, MCA.
Furthermore, Rudolph's second issue, the claim that the show-up identification procedure was impermissibly suggestive, is barred by the doctrine of res judicata inasmuch as that claim was or could have been raised on direct appeal. See Hawkins v. State (1990), 242 Mont. 348, 790 P.2d 990, 992. Accordingly, Rudolph is procedurally barred from raising issues 1 and 2 in his petition for post conviction relief. Unless a post conviction petitioner can demonstrate a fundamental miscarriage of justice (which Rudolph has failed to do here) we will consistently apply the procedural bar. See State v. Baker (1995), [272 Mont. 273], 901 P.2d 54, 58-59.
In his third issue Rudolph claims that he has been improperly awarded good time credits. The record amply demonstrates that Rudolph's contentions are without merit. The award of good time credits is solely within the discretion of the Department of Corrections and the only applicable limits on the Department are that the grant of good time credits may not exceed the maximum amount permitted by statute. Remington v. Department of Corrections and Human Services (1992), 255 Mont. 480, 844 P.2d 50, 52. Rudolph has been credited with all good time credits which he earned while housed in the secure treatment unit at the Montana State Hospital, from May 27, 1988 to March 15, 1991, and for all good time *1009 credits which he earned while an inmate at the Montana State Penitentiary from March 15, 1991 to the present. In addition, Rudolph received credit for all time served since the date of his sentencing as well as the jail credits prior to sentencing. We conclude that he is not entitled to any relief on his claims raised under issue 3, of his petition for writ of habeas corpus.
Accordingly, having reviewed Rudolph's petition and for the reasons aforestated:
IT IS ORDERED that Rudolph's petition for writ of habeas corpus as to issues 1 and 2 should be and the same is hereby dismissed; and
IT IS FURTHER ORDERED that, deeming Rudolph's petition for writ of habeas corpus as to issues 1 and 2 to be one for post conviction relief, the said petition should be and is hereby denied; and
IT IS FURTHER ORDERED that Rudolph's petition for writ of habeas corpus as to issue 3, should be and the same is hereby denied; and
IT IS FURTHER ORDERED that the Clerk of this Court give notice of this order by mail to Rudolph, pro se, and to the Attorney General for the State of Montana.
