afs: Remove DFlushDCache()

The function DFlushDcache() is not referenced anywhere within the
source tree.

Remove the function DFlushDCache().

The commit: 'disconnected-shadow-directory-fixes-20090121' (4045f3d535)
removed the code reference to DFlushDCache() and the commit:
"dir: Prototype and function name cleanup" (5ad1e6cb90) removed the
function prototype.  The function was introduced in the commit:
"disconnected-flush-before-shadowing-20090119" (e1cc987ea5).

This function is flagged due to a missing prototype when building
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
 "Makefile.extrawarn: turn on missing-prototypes globally" (0fcb70851f).

When building against a kernel with CONFIG_WERROR=y, the build fails.

Reviewed-on: https://gerrit.openafs.org/15615
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 432ac5810e51bb5bb2cf1df0bfebc64d1c4d7a39)

Change-Id: Ib8ab79c76c633632215e02235f47fdb1d744e721
Reviewed-on: https://gerrit.openafs.org/15684
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
Cheyenne Wills 2024-01-12 08:56:31 -07:00 committed by Benjamin Kaduk
parent bd2828f1ab
commit bb7eaafb2e

View File

@ -516,31 +516,6 @@ DFlushBuffer(struct buffer *ab)
afs_CFileClose(tfile);
}
void
DFlushDCache(struct dcache *adc)
{
int i;
struct buffer *tb;
ObtainReadLock(&afs_bufferLock);
for (i = 0; i <= PHPAGEMASK; i++)
for (tb = phTable[pHash(adc->index, i)]; tb; tb = tb->hashNext)
if (tb->fid == adc->index) {
ObtainWriteLock(&tb->lock, 701);
tb->lockers++;
ReleaseReadLock(&afs_bufferLock);
if (tb->dirty) {
DFlushBuffer(tb);
}
tb->lockers--;
ReleaseWriteLock(&tb->lock);
ObtainReadLock(&afs_bufferLock);
}
ReleaseReadLock(&afs_bufferLock);
}
int
DFlush(void)
{