Page MenuHomeFreeBSD

file: Use the right fd in fgetvp_lookup()
ClosedPublic

Authored by markj on Dec 31 2023, 4:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 28, 1:55 AM
Unknown Object (File)
May 18 2024, 4:00 AM
Unknown Object (File)
May 10 2024, 8:41 AM
Unknown Object (File)
May 9 2024, 9:40 AM
Unknown Object (File)
May 9 2024, 2:15 AM
Unknown Object (File)
May 3 2024, 6:59 PM
Unknown Object (File)
Apr 23 2024, 1:54 PM
Unknown Object (File)
Apr 7 2024, 6:51 PM
Subscribers

Details

Summary

This is a no-op for now since the sole caller passes fd=ndp->ni_dirfd,
but the old code was still wrong. For some reason I do not see a
warning about "fd" being unused.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Dec 31 2023, 4:33 PM

What is the expected semantic for the case of fd != ndp->ni_dirfd?

My first reaction to the patch was to propose removing the fd argument instead.

In D43257#985958, @kib wrote:

What is the expected semantic for the case of fd != ndp->ni_dirfd?

Indeed, it does not make much sense.

My first reaction to the patch was to propose removing the fd argument instead.

Same for fgetvp_lookup_smr() then, I suppose?

In D43257#985958, @kib wrote:

My first reaction to the patch was to propose removing the fd argument instead.

Same for fgetvp_lookup_smr() then, I suppose?

Definitely. Also perhaps it is time to remove the CAPABILITIES option.

In D43257#985983, @kib wrote:
In D43257#985958, @kib wrote:

My first reaction to the patch was to propose removing the fd argument instead.

Same for fgetvp_lookup_smr() then, I suppose?

Definitely. Also perhaps it is time to remove the CAPABILITIES option.

I'm for it. There was this attempt which apparently failed: D10776. The reasons are probably mostly gone since arm64's compat32 support has evolved and mips is gone. Maybe @oshogbo or @emaste have an opinion on this?

  • Remove the "fd" parameter entirely.
  • Update fgetvp_lookup_smr() similarly.
This revision is now accepted and ready to land.Dec 31 2023, 10:02 PM