From e489c44328b12637162f0a62f92f1f9b95279428 Mon Sep 17 00:00:00 2001 From: Rainer Toebbicke Date: Tue, 4 May 2010 14:11:30 +0200 Subject: [PATCH] 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 Tested-by: Derrick Brashear --- src/vol/vutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vol/vutil.c b/src/vol/vutil.c index bbd2ef0c84..404273afe8 100644 --- a/src/vol/vutil.c +++ b/src/vol/vutil.c @@ -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;