Re: [PATCH for 6.19-rc1] fs: preserve file type in make_bad_inode() unless invalid

Jan Kara
2026-01-07T10:16:04Z

On Wed 07-01-26 18:53:40, Tetsuo Handa wrote:
> On 2026/01/07 18:36, Jan Kara wrote:
> > Since Jens has picked up
> > https://lore.kernel.org/all/20251217190040.490204-2-rpthibeault@gmail.com/
> > yesterday I suspect the original reproducer for OCFS2 will not cause issue
> > anymore even without 58b6fcd2ab34 because as far as I had a look the
> > original problem was caused by the loop device getting messed up under a
> > mounted OCFS2 filesystem. It would be good to verify my analysis is correct
> > but I think just reverting 58b6fcd2ab34 might be the best option at this
> > point.
>
> Well, that patch wants
>
> err = mutex_lock_killable(&lo->lo_mutex);
> - if (err)
> + if (err) {
> + if (!(mode & BLK_OPEN_EXCL))
> + bd_abort_claiming(bdev, loop_set_status);
> return err;
> + }
>
> change...

Ah, a good catch! Please send a fixup to Jens. Thanks!

Honza

--
Jan Kara <jack@suse.com>
SUSE Labs, CR