From f889469e271cee5ccf362d829c7827307a6add4c Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 18 Feb 2014 13:00:38 -0600 Subject: [PATCH] vol: Make FindLinkHandle static and namei-only FindLinkHandle is only referenced inside vol-salvage.c. Also, the concept of a link table only exists on namei, so the function is only used for the namei server (and it's only called by other namei-only code). So, make the function static, and put it inside the AFS_NAMEI_ENV ifdef, to be a little more clear about where it can be used. Moving it inside the AFS_NAMEI_ENV ifdef also avoids a warning if FindLinkHandle is made static, since otherwise the function would be defined but unused on non-namei. This change should incur no difference in behavior; it is just code reorganization. Change-Id: Ia8cdadafaf15c724462f600514aa59910619a090 Reviewed-on: http://gerrit.openafs.org/10848 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- src/vol/vol-salvage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index 03945ff30..547a5ca75 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -1801,10 +1801,11 @@ GetVolumeSummary(struct SalvInfo *salvinfo, VolumeId singleVolumeNumber) return 0; } +#ifdef AFS_NAMEI_ENV /* Find the link table. This should be associated with the RW volume, even * if there is only an RO volume at this site. */ -Inode +static Inode FindLinkHandle(struct InodeSummary *isp, int nVols, struct ViceInodeInfo *allInodes) { @@ -1824,7 +1825,6 @@ FindLinkHandle(struct InodeSummary *isp, int nVols, return (Inode) - 1; } -#ifdef AFS_NAMEI_ENV static int CheckDupLinktable(struct SalvInfo *salvinfo, struct InodeSummary *isp, struct ViceInodeInfo *ip) { -- 2.39.5