diff options
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r-- | libglusterfs/src/inode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c index b70b4a93957..e45fe0deb4a 100644 --- a/libglusterfs/src/inode.c +++ b/libglusterfs/src/inode.c @@ -1519,6 +1519,14 @@ inode_table_prune (inode_table_t *table) { while (table->lru_limit && table->lru_size > (table->lru_limit)) { + if (list_empty (&table->lru)) { + gf_msg_callingfn (THIS->name, GF_LOG_WARNING, 0, + LG_MSG_INVALID_INODE_LIST, + "Empty inode lru list found" + " but with (%d) lru_size", + table->lru_size); + break; + } entry = list_entry (table->lru.next, inode_t, list); @@ -1788,6 +1796,7 @@ inode_table_destroy (inode_table_t *inode_table) { inode_t, list); __inode_forget (trav, 0); __inode_retire (trav); + inode_table->lru_size--; } while (!list_empty (&inode_table->active)) { |