Message ID | 1479766499-29972-2-git-send-email-jcody@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/block/gluster.c b/block/gluster.c index 0ce15f7..891c13b 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -239,12 +239,13 @@ static glfs_t *glfs_find_preopened(const char *volume) static void glfs_clear_preopened(glfs_t *fs) { ListElement *entry = NULL; + ListElement *next; if (fs == NULL) { return; } - QLIST_FOREACH(entry, &glfs_list, list) { + QLIST_FOREACH_SAFE(entry, &glfs_list, list, next) { if (entry->saved.fs == fs) { if (--entry->saved.ref) { return;