[PATCH 0/3] fs: return error pointers from ->get_link() on failure

Sascha Hauer s.hauer at pengutronix.de
Mon Nov 2 06:29:25 PST 2026


On 2026-11-02 11:21, Ahmad Fatoum wrote:
> Hello Sascha,
> 
> On 11/2/26 10:08 AM, Sascha Hauer wrote:
> > Like in Linux, the callers of ->get_link() expect an error pointer when
> > the link can't be read: readlinkat() checks the result only with
> > IS_ERR() before copying from it, and path lookup takes NULL to mean that
> > the link has already been followed and continues from the directory
> > containing the link. barebox has no nd_jump_link(), so a NULL from
> > ->get_link() is never legitimate there.
> > 
> > 9p and nfs already return error pointers, and the squashfs series posted
> > separately converts squashfs_get_link(). This series converts the
> > remaining file systems:
> > 
> > - legacy returned NULL when the driver's readlink failed.
> 
> What do you think, is it time we (meaning you, because you said the
> l-word) do something about the legacy file systems? :D

Yes, sure. I can have a look into it.

Sascha

--
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list