Page MenuHomeFreeBSD

vfs: Simplify vfs_write_resume()/vn_start_write_refed()
ClosedPublic

Authored by olce on Mar 27 2026, 3:02 PM.
Tags
None
Referenced Files
F163365397: D56108.diff
Wed, Jul 22, 1:26 PM
Unknown Object (File)
Mon, Jul 20, 1:53 AM
Unknown Object (File)
Wed, Jul 15, 7:14 AM
Unknown Object (File)
Wed, Jul 15, 7:14 AM
Unknown Object (File)
Wed, Jul 8, 9:22 AM
Unknown Object (File)
Wed, Jul 8, 9:22 AM
Unknown Object (File)
Sun, Jul 5, 4:32 AM
Unknown Object (File)
Jun 18 2026, 8:52 PM
Subscribers

Details

Summary

The call to vn_start_write_refed() from vfs_write_resume() with
'mplocked' set to 'true' exactly boils down to doing an increment of
'mnt_writeopcount', albeit with lots of unnecessary verifications.

Replace it with an inline incrementation. As the original call was the
last with 'mplocked' with 'true', remove the 'mplocked' parameter from
vfs_write_resume(), simplifying its code accordingly ('mplocked' always
false).

While here, in vfs_write_resume(), initialize 'error' out of the mount
lock.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Diff Detail

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