[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aH-SbYUKE1Ydb-tJ@casper.infradead.org>
Date: Tue, 22 Jul 2025 14:30:21 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: Viacheslav Dubeyko <Slava.Dubeyko@....com>,
"glaubitz@...sik.fu-berlin.de" <glaubitz@...sik.fu-berlin.de>,
"frank.li@...o.com" <frank.li@...o.com>,
"slava@...eyko.com" <slava@...eyko.com>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3] hfs: remove BUG() from
hfs_release_folio()/hfs_test_inode()/hfs_write_inode()
On Tue, Jul 22, 2025 at 07:42:35PM +0900, Tetsuo Handa wrote:
> I can update patch description if you have one, but I don't plan to try something like below.
Why not? Papering over the underlying problem is what I rejected in v1,
and here we are months later with you trying a v4.
> @@ -393,20 +393,30 @@ struct inode *hfs_iget(struct super_block *sb, struct hfs_cat_key *key, hfs_cat_
> switch (rec->type) {
> case HFS_CDR_DIR:
> cnid = be32_to_cpu(rec->dir.DirID);
> break;
> case HFS_CDR_FIL:
> cnid = be32_to_cpu(rec->file.FlNum);
> break;
> default:
> return NULL;
> }
> + if (cnid < HFS_FIRSTUSER_CNID) {
> + switch (cnid) {
> + case HFS_ROOT_CNID:
> + case HFS_EXT_CNID:
> + case HFS_CAT_CNID:
> + break;
> + default:
> + return NULL;
> + }
> + }
> inode = iget5_locked(sb, cnid, hfs_test_inode, hfs_read_inode, &data);
> if (inode && (inode->i_state & I_NEW))
> unlock_new_inode(inode);
> return inode;
> }
>
Powered by blists - more mailing lists