In mapdirs(), do not use the `dp' inode pointer after searchdir()
has been called, since it points to a shared inode buffer that may be overwritten. The two cases where `dp' was used incorrectly appear to have been overlooked when "nodump" inheritance was first added in revision 1.12. This is reported to correct propagation of the nodump flag on directories that are larger than one block in size. PR: bin/58912 Submitted by: Volker Paepcke <vpaepcke@incore.de> MFC after: 1 week
This commit is contained in:
parent
6c2d58b0b2
commit
9295c1ca71
@ -274,8 +274,8 @@ mapdirs(ino_t maxino, long *tapesize)
|
||||
for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) {
|
||||
if (DIP(&di, di_db[i]) != 0)
|
||||
ret |= searchdir(ino, DIP(&di, di_db[i]),
|
||||
(long)sblksize(sblock, DIP(dp, di_size), i),
|
||||
filesize, tapesize, nodump);
|
||||
(long)sblksize(sblock, DIP(&di, di_size),
|
||||
i), filesize, tapesize, nodump);
|
||||
if (ret & HASDUMPEDFILE)
|
||||
filesize = 0;
|
||||
else
|
||||
@ -289,7 +289,7 @@ mapdirs(ino_t maxino, long *tapesize)
|
||||
}
|
||||
if (ret & HASDUMPEDFILE) {
|
||||
SETINO(ino, dumpinomap);
|
||||
*tapesize += blockest(dp);
|
||||
*tapesize += blockest(&di);
|
||||
change = 1;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user