diff options
author | kib <kib@FreeBSD.org> | 2008-09-01 13:18:16 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-09-01 13:18:16 +0000 |
commit | ffc7e2eee2f521622d72265d5321dd5b4d460284 (patch) | |
tree | 0bf7b274c210403a2e10628724d89c720f3a785c /sys/fs/msdosfs/msdosfs_fat.c | |
parent | 65d9c98ddd8a33f8c8f4bfbeb3481cf2f09bfd70 (diff) | |
download | FreeBSD-src-ffc7e2eee2f521622d72265d5321dd5b4d460284.zip FreeBSD-src-ffc7e2eee2f521622d72265d5321dd5b4d460284.tar.gz |
In rev. 1.17 (r33548) of msdosfs_fat.c, relative cluster numbers were
replaced by file relative sector numbers as the buffer block number when
zero-padding a file during extension. Revert the change, it causes wrong
blocks filled with zeroes on seeking beyond end of file.
PR: kern/47628
Submitted by: tegge
MFC after: 3 days
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_fat.c')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index 32da0e3e..7fae9c0 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -1065,13 +1065,13 @@ extendfile(dep, count, bpp, ncp, flags) pmp->pm_bpcluster, 0, 0, 0); else { bp = getblk(DETOV(dep), - de_cn2bn(pmp, frcn++), + frcn++, pmp->pm_bpcluster, 0, 0, 0); /* * Do the bmap now, as in msdosfs_write */ if (pcbmap(dep, - de_bn2cn(pmp, bp->b_lblkno), + bp->b_lblkno, &blkno, 0, 0)) bp->b_blkno = -1; if (bp->b_blkno == -1) |