Page MenuHomeFreeBSD

vfs: Simplify vfs_write_resume()/vn_start_write_refed()
ClosedPublic

Authored by olce on Fri, Mar 27, 3:02 PM.
Tags
None
Referenced Files
F150683049: D56108.diff
Fri, Apr 3, 8:24 AM
Unknown Object (File)
Thu, Apr 2, 8:39 PM
Unknown Object (File)
Thu, Apr 2, 9:10 AM
Unknown Object (File)
Wed, Apr 1, 2:07 AM
Unknown Object (File)
Mon, Mar 30, 7:44 PM
Unknown Object (File)
Mon, Mar 30, 7:37 PM
Unknown Object (File)
Mon, Mar 30, 11:50 AM
Unknown Object (File)
Sat, Mar 28, 10:42 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 Not Applicable
Unit
Tests Not Applicable