Message ID | 04a7f9e55e0930b87805f7c97851eea4610e78fc.1635340713.git.qemu_oss@crudebyte.com |
---|---|
State | New |
Headers | show |
Series | [PULL,1/8] 9pfs: fix wrong I/O block size in Rgetattr | expand |
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 5c57344667..e874899ef5 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1280,8 +1280,7 @@ static int32_t blksize_to_iounit(const V9fsPDU *pdu, int32_t blksize) * as well as less than (client msize - P9_IOHDRSZ) */ if (blksize) { - iounit = blksize; - iounit *= (s->msize - P9_IOHDRSZ) / blksize; + iounit = QEMU_ALIGN_DOWN(s->msize - P9_IOHDRSZ, blksize); } if (!iounit) { iounit = s->msize - P9_IOHDRSZ;