MFC r256209:
Reduce code duplication, introduce the getmaxfd() helper to calculate
the max filedescriptor index.
MFC r256211:
Do not flush buffers when the v_object of the passed vnode does not
really belong to it.
MFC r256213:
Do not try to flush device vnodes from the buffer allocation context.