mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +00:00
Do not corrupt volume linktable when special file already exists
Upon volume creation, when a special file unexpectedly exists, e.g. due to a failed cleanup, do not blindly assume that it is the link table. Otherwise the latter's magic will get silently overwritten. Change-Id: Iba05ae771e04272a3dab5534fcfc24cda5ee7df5 Reviewed-on: http://gerrit.openafs.org/1903 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
95636c6fac
commit
e489c44328
@ -217,7 +217,7 @@ VCreateVolume_r(Error * ec, char *partname, VolId volumeId, VolId parentId)
|
||||
(p->inodeType == VI_LINKTABLE) ? vol.parentId : vol.id,
|
||||
INODESPECIAL, p->inodeType, vol.parentId);
|
||||
if (!(VALID_INO(*(p->inode)))) {
|
||||
if (errno == EEXIST) {
|
||||
if (errno == EEXIST && (p->inodeType == VI_LINKTABLE)) {
|
||||
/* Increment the reference count instead. */
|
||||
IHandle_t *lh;
|
||||
int code;
|
||||
|
Loading…
Reference in New Issue
Block a user