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
F152135489: D56108.diff
Sun, Apr 12, 11:46 PM
F152101577: D56108.id174522.diff
Sun, Apr 12, 5:58 PM
Unknown Object (File)
Sun, Apr 12, 3:00 AM
Unknown Object (File)
Sat, Apr 11, 8:04 PM
Unknown Object (File)
Sat, Apr 11, 6:14 AM
Unknown Object (File)
Fri, Apr 10, 4:17 AM
Unknown Object (File)
Wed, Apr 8, 9:59 AM
Unknown Object (File)
Fri, Apr 3, 8:24 AM
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