summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/inode.c9
-rw-r--r--libglusterfs/src/libglusterfs-messages.h10
2 files changed, 18 insertions, 1 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)) {
diff --git a/libglusterfs/src/libglusterfs-messages.h b/libglusterfs/src/libglusterfs-messages.h
index d18f4cb3112..d2ad44e470e 100644
--- a/libglusterfs/src/libglusterfs-messages.h
+++ b/libglusterfs/src/libglusterfs-messages.h
@@ -36,7 +36,7 @@
*/
#define GLFS_LG_BASE GLFS_MSGID_COMP_LIBGLUSTERFS
-#define GLFS_LG_NUM_MESSAGES 206
+#define GLFS_LG_NUM_MESSAGES 207
#define GLFS_LG_MSGID_END (GLFS_LG_BASE + GLFS_LG_NUM_MESSAGES + 1)
/* Messaged with message IDs */
#define glfs_msg_start_lg GLFS_LG_BASE, "Invalid: Start of messages"
@@ -1762,6 +1762,14 @@
* @recommendedaction
*
*/
+#define LG_MSG_INVALID_INODE_LIST (GLFS_LG_BASE + 207)
+
+/*!
+ * @messageid
+ * @diagnosis
+ * @recommendedaction
+ *
+ */
/*------------*/
#define glfs_msg_end_lg GLFS_LG_MSGID_END, "Invalid: End of messages"