Re: [PATCH] gfs2: fix hung task in gfs2_jhead_process_page
Deepanshu Kartikey <[email protected]> Thu, 26 Mar 2026 05:24:09 +0530
| Newsgroups | dev.linux.lists.gfs2,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CADhLXY4cahmyYEYvKaBXQddmermnDBpjbgAzt5roqGVvzcPGYw@mail.gmail.com> |
On Wed, Mar 25, 2026 at 7:12 AM Andreas Gruenbacher <[email protected]> wrote: > > > How about something like this? > > --- a/fs/gfs2/bmap.c > +++ b/fs/gfs2/bmap.c > @@ -2210,7 +2210,7 @@ void gfs2_free_journal_extents(struct gfs2_jdesc *jd) > * @dblock: The physical block at start of new extent > * @blocks: Size of extent in fs blocks > * > - * Returns: 0 on success or -ENOMEM > + * Returns: 0 on success, or an error code > */ > > static int gfs2_add_jextent(struct gfs2_jdesc *jd, u64 lblock, u64 > dblock, u64 blocks) > @@ -2219,6 +2219,8 @@ static int gfs2_add_jextent(struct gfs2_jdesc > *jd, u64 lblock, u64 dblock, u64 b > > if (!list_empty(&jd->extent_list)) { > jext = list_last_entry(&jd->extent_list, struct > gfs2_journal_extent, list); > + if (jext->lblock + jext->blocks != lblock) > + return -EINVAL; > if ((jext->dblock + jext->blocks) == dblock) { > jext->blocks += blocks; > return 0; > > Thanks, > Andreas > Thanks for the clarification. It looks good. I have sent the patch v2 Deepanshu