mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
dir: dtest should flush on error when creating directories
The dtest -f subcommand (CRTest()) exits immediately if there is an error while adding files. This may create an empty, incomplete, or corrupt directory object on disk because we neglected to call DFlush before exiting. Always call DFlush from CRTest() whether it fails or succeeds. Change-Id: Ia7b4ad00ea6f4f9f788cd75ae726bdadb60ee9c3 Reviewed-on: https://gerrit.openafs.org/13796 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
2a1a65faab
commit
c5a9d4447d
@ -158,7 +158,7 @@ CRTest(char *dname, char *ename, int count)
|
||||
}
|
||||
if (code) {
|
||||
printf("code for '%s' is %d\n", tbuffer, code);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
DFlush();
|
||||
|
Loading…
x
Reference in New Issue
Block a user