From 649280ab5bcd1918774b6206f410d08c055341a6 Mon Sep 17 00:00:00 2001 From: Shraddha Barke Date: Fri, 30 Oct 2015 20:59:07 +0530 Subject: [PATCH] Staging: lustre: fld: Remove unused functions Remove functions fld_cache_delete and fld_cache_delete_nolock since they are defined but not used. Signed-off-by: Shraddha Barke Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/fld/fld_cache.c | 26 ------------------- .../staging/lustre/lustre/fld/fld_internal.h | 4 --- 2 files changed, 30 deletions(-) diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c b/drivers/staging/lustre/lustre/fld/fld_cache.c index c4db390a73d5..baa04074a61f 100644 --- a/drivers/staging/lustre/lustre/fld/fld_cache.c +++ b/drivers/staging/lustre/lustre/fld/fld_cache.c @@ -444,36 +444,10 @@ int fld_cache_insert(struct fld_cache *cache, return rc; } -void fld_cache_delete_nolock(struct fld_cache *cache, - const struct lu_seq_range *range) -{ - struct fld_cache_entry *flde; - struct fld_cache_entry *tmp; - struct list_head *head; - - head = &cache->fci_entries_head; - list_for_each_entry_safe(flde, tmp, head, fce_list) { - /* add list if next is end of list */ - if (range->lsr_start == flde->fce_range.lsr_start || - (range->lsr_end == flde->fce_range.lsr_end && - range->lsr_flags == flde->fce_range.lsr_flags)) { - fld_cache_entry_delete(cache, flde); - break; - } - } -} - /** * Delete FLD entry in FLD cache. * */ -void fld_cache_delete(struct fld_cache *cache, - const struct lu_seq_range *range) -{ - write_lock(&cache->fci_lock); - fld_cache_delete_nolock(cache, range); - write_unlock(&cache->fci_lock); -} struct fld_cache_entry *fld_cache_entry_lookup_nolock(struct fld_cache *cache, diff --git a/drivers/staging/lustre/lustre/fld/fld_internal.h b/drivers/staging/lustre/lustre/fld/fld_internal.h index ab184a685287..88ec7b114caa 100644 --- a/drivers/staging/lustre/lustre/fld/fld_internal.h +++ b/drivers/staging/lustre/lustre/fld/fld_internal.h @@ -156,10 +156,6 @@ int fld_cache_insert(struct fld_cache *cache, struct fld_cache_entry *fld_cache_entry_create(const struct lu_seq_range *range); -void fld_cache_delete(struct fld_cache *cache, - const struct lu_seq_range *range); -void fld_cache_delete_nolock(struct fld_cache *cache, - const struct lu_seq_range *range); int fld_cache_lookup(struct fld_cache *cache, const u64 seq, struct lu_seq_range *range); -- 2.20.1