the intent is that the sync command ensures that all current IO has gone to disc without allowing file system activity meanwhile--that's what the rlock of mainlock does-- but syncproc is allowed to run concurrently with file system activity to encourage the disc to be reasonably up to date but without ensuring it. there are interlocks on the buffers themselves (for instance) to prevent confusion between several processes active at once, whether for file system activity or syncproc.