mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Use the correct block number for updating the backup copy of the FAT when
deleting a file. Deleting a large file used to scramble the backup copy.
This commit is contained in:
parent
045de8d38f
commit
24d4540cff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6303
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_fat.c,v 1.3 1994/10/10 07:57:33 phk Exp $ */
|
||||
/* $Id: msdosfs_fat.c,v 1.4 1994/12/12 12:35:45 bde Exp $ */
|
||||
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -765,7 +765,7 @@ freeclusterchain(pmp, cluster)
|
||||
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
|
||||
if (lbn != bn) {
|
||||
if (bp)
|
||||
updatefats(pmp, bp, bn);
|
||||
updatefats(pmp, bp, lbn);
|
||||
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
|
||||
if (error)
|
||||
return error;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_fat.c,v 1.3 1994/10/10 07:57:33 phk Exp $ */
|
||||
/* $Id: msdosfs_fat.c,v 1.4 1994/12/12 12:35:45 bde Exp $ */
|
||||
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -765,7 +765,7 @@ freeclusterchain(pmp, cluster)
|
||||
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
|
||||
if (lbn != bn) {
|
||||
if (bp)
|
||||
updatefats(pmp, bp, bn);
|
||||
updatefats(pmp, bp, lbn);
|
||||
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
|
||||
if (error)
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user