Subject: Re: linux-next: build warning after merge of the vfs tree

From: Mauro Carvalho Chehab <[email-masked]>
Date: Thu, 15 Jan 2026 09:28:34 +0100

Em Thu, 15 Jan 2026 15:04:58 +1100
Stephen Rothwell <[email-masked]> escreveu:

> Hi Al,
> 
> On Thu, 15 Jan 2026 03:10:53 +0000 Al Viro <[email-masked]> wrote:
> >
> > On Thu, Jan 15, 2026 at 02:01:32PM +1100, Stephen Rothwell wrote:  
> > > 
> > > After merging the vfs tree, today's linux-next build (htmldocs) produced
> > > this warning:
> > > 
> > > Documentation/filesystems/porting.rst:1348: ERROR: Unknown target name: "filename". [docutils]
> > > 
> > > Introduced by commit
> > > 
> > >   7335480a8461 ("non-consuming variant of do_linkat()")    
> > 
> > Egads...  That's from "filename_{link,renameat2}()" in there (there's also
> > "do_{link,renameat2}()" earlier in the same line, but that didn't produce
> > a warning.

Based on the error message, I suspect it is trying to create an internal
cross-reference to a "filename" reference:

	$ ack "Unknown target name" sphinx_latest/
	sphinx_latest/lib/python3.13/site-packages/docutils/transforms/references.py
	907:                        f'Unknown target name: "{node["refname"]}".',

I can't explain why filename_{} was handled differently than do_{},
but had you check the html output? Maybe there is out there a "do"
reference, which was incorrectly used here.

What I suggest here (and on similar cases) is to either:

1) Split it (and similar cases) into: 

	"filename_link() and filename_renameat2()" 

   which would give sphinx automarkup the opportunity to create
   cross references

   (my preference)

2) tell Sphinx that this is a literal with ``filename_{link,renameat2}()``

> > 
> > Any suggestions re better way to spell it for .rst?  
> 
> It eventually becomes (literally) "filename_..." so that might be the
> issue.  Maybe quote it like 'function_...()'?

The issue is that unmatched underscores (or asterisk) at either beginning 
of end of a word has special meaning on Sphinx.

> 
> Maybe Jon or Mauro have a suggestion.

Thanks,
Mauro