Page MenuHomeFreeBSD

vnlru: avoid trigger calculation when force < 2
AcceptedPublic

Authored by rlibby on Mon, May 11, 7:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 16, 11:31 PM
Unknown Object (File)
Thu, May 14, 4:37 AM
Unknown Object (File)
Wed, May 13, 1:39 AM
Unknown Object (File)
Tue, May 12, 5:31 PM
Unknown Object (File)
Tue, May 12, 5:14 PM
Unknown Object (File)
Mon, May 11, 11:01 PM
Unknown Object (File)
Mon, May 11, 10:55 PM
Subscribers

Details

Reviewers
kib
olce

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73055
Build 69938: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mon, May 11, 9:32 PM

(Minor: I wouldn't add the braces on the "then" part of if (force < 2).)

(Minor: I wouldn't add the braces on the "then" part of if (force < 2).)

Normally, if one branch uses {}, other branch should do it as well. So the patch is more style-compliant as is.

In D56950#1304757, @kib wrote:

(Minor: I wouldn't add the braces on the "then" part of if (force < 2).)

Normally, if one branch uses {}, other branch should do it as well. So the patch is more style-compliant as is.

style(9) says otherwise ("Braces that are not necessary may be left out.", and see the example just below that part).

Besides removing not necessary braces being my personal preference, it would also reduce the diff here (even if admittedly it is quite small so does not make a big difference).

Regarding braces... I prefer to leave it with the braces. My preference is to apply to both branches if applied to one. Style says "may" be left out. There are many examples of the balanced use, including about 10 in this file.

Also, I realized that I missed moving the vnlru_read_freevnodes() call here. Will update for that. Sorry for the churn.

Also make the vnlru_read_freevnodes() call conditional.

This revision now requires review to proceed.Tue, May 12, 7:15 PM

Regarding braces... I prefer to leave it with the braces. My preference is to apply to both branches if applied to one. Style says "may" be left out. There are many examples of the balanced use, including about 10 in this file.

Yes, "may". I was responding to kib@, who was implying "must not". If there are other uses in the file, fine (well, I might axe them when I get to rewrite this part, but unfortunately this is not going to happen any time soon).

This revision is now accepted and ready to land.Tue, May 12, 7:40 PM