Re: [PATCH 3/6] fs,fsverity: handle fsverity in generic_file_open

Christoph Hellwig
2026-01-19T09:26:57Z

On Mon, Jan 19, 2026 at 10:05:56AM +0100, Jan Kara wrote:
> > + if (IS_ENABLED(CONFIG_FS_VERITY) && IS_VERITY(inode)) {
> > + if (filp->f_mode & FMODE_WRITE)
> > + return -EPERM;
> > + return fsverity_file_open(inode, filp);
> > + }
>
> Why do you check f_mode here when fsverity_file_open() checks for it as
> well?

Probably because it's a left over from when I tried to open code
fsverity_file_open here. I'll fix it up.