mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
namei: Remove extraneous rmdir
We just unlinked the file, so we know we won't be able to rmdir() the same thing. Give a path one level higher to namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir. Change-Id: Ifa54d1cc07ed2d277416d09eabc45aa1e1c3803a Reviewed-on: http://gerrit.openafs.org/5833 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
4c679e380f
commit
b41e30a55c
@ -1006,6 +1006,11 @@ namei_dec(IHandle_t * ih, Inode ino, int p1)
|
|||||||
/* Try to remove directory. If it fails, that's ok.
|
/* Try to remove directory. If it fails, that's ok.
|
||||||
* Salvage will clean up.
|
* Salvage will clean up.
|
||||||
*/
|
*/
|
||||||
|
char *slash = strrchr(name.n_path, OS_DIRSEPC);
|
||||||
|
if (slash) {
|
||||||
|
/* avoid an rmdir() on the file we just unlinked */
|
||||||
|
*slash = '\0';
|
||||||
|
}
|
||||||
(void)namei_RemoveDataDirectories(&name);
|
(void)namei_RemoveDataDirectories(&name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user