Re: [PATCH] f2fs: use the mount idmap for the owner check in f2fs_xattr_advise_set()

From: Rochan Avlur

Date: Mon Aug 03 2026 - 09:53:58 EST


Hi Chao,

> > f2fs_xattr_advise_set() calls inode_owner_or_capable() with
> > &nop_mnt_idmap before allowing the advise xattr to be set, instead of
> > the idmap that was passed into the handler.
> >
> > Since f2fs supports idmapped mounts, this compares the caller's fsuid
> > against the unmapped on-disk owner rather than the mapped owner; resulting
> > in the actual owner to be wrongly denied with -EPERM. Use the idmap
> > argument that was already passed to the xattr handler instead.
> >
> > Fixes: 984fc4e76d63 ("f2fs: support idmapped mounts")
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Rochan Avlur <rochan.avlur@xxxxxxxxx>
>
> Thanks for the patch.
>
> I notice there is already a patch:
>
> https://lore.kernel.org/linux-f2fs-devel/20260716025908.608098-1-zhanxusheng@xxxxxxxxxx

Thanks for pointing that out. I wasn't aware of Zhan's patch when I
submitted mine. Happy to defer to the earlier submission.