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
4835e2c745
commit
155ea0634c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122060
@ -274,8 +274,8 @@ mapdirs(ino_t maxino, long *tapesize)
|
|||||||
for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) {
|
for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) {
|
||||||
if (DIP(&di, di_db[i]) != 0)
|
if (DIP(&di, di_db[i]) != 0)
|
||||||
ret |= searchdir(ino, DIP(&di, di_db[i]),
|
ret |= searchdir(ino, DIP(&di, di_db[i]),
|
||||||
(long)sblksize(sblock, DIP(dp, di_size), i),
|
(long)sblksize(sblock, DIP(&di, di_size),
|
||||||
filesize, tapesize, nodump);
|
i), filesize, tapesize, nodump);
|
||||||
if (ret & HASDUMPEDFILE)
|
if (ret & HASDUMPEDFILE)
|
||||||
filesize = 0;
|
filesize = 0;
|
||||||
else
|
else
|
||||||
@ -289,7 +289,7 @@ mapdirs(ino_t maxino, long *tapesize)
|
|||||||
}
|
}
|
||||||
if (ret & HASDUMPEDFILE) {
|
if (ret & HASDUMPEDFILE) {
|
||||||
SETINO(ino, dumpinomap);
|
SETINO(ino, dumpinomap);
|
||||||
*tapesize += blockest(dp);
|
*tapesize += blockest(&di);
|
||||||
change = 1;
|
change = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user