MFC r205860,206097: correctly set b_offset for getblk(devvp)

This commit is contained in:
Andriy Gapon 2010-04-17 11:06:42 +00:00
parent b8fde9ef74
commit e747dbab75

View File

@ -2678,7 +2678,7 @@ loop:
*/
if (flags & GB_NOCREAT)
return NULL;
bsize = bo->bo_bsize;
bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize;
offset = blkno * bsize;
vmio = vp->v_object != NULL;
maxsize = vmio ? size + (offset & PAGE_MASK) : size;