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)
Tue, Nov 19, 7:25 AM
Unknown Object (File)
Tue, Nov 19, 6:24 AM
Unknown Object (File)
Tue, Nov 19, 4:54 AM
Unknown Object (File)
Nov 1 2024, 5:44 PM
Unknown Object (File)
Oct 6 2024, 10:03 PM
Unknown Object (File)
Oct 4 2024, 9:32 AM
Unknown Object (File)
Oct 4 2024, 12:55 AM
Unknown Object (File)
Oct 1 2024, 6:52 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 55176
Build 52065: arc lint + arc unit

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