afs: Traverse discard/free dslot list if errors
authorAndrew Deason <adeason@sinenomine.net>
Thu, 1 Nov 2012 18:41:06 +0000 (13:41 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 13 Nov 2012 18:38:01 +0000 (10:38 -0800)
commit336939179721d79a6798614ff747dd06701e3edc
tree745bf960afb6d1f90a9bdf40fe26fbd79647e772
parentf74a0a7bbb37a8ab6050e833cf8d66abdff31854
afs: Traverse discard/free dslot list if errors

Currently, when we pull a dslot off of the discard or free list, we
just try to get the first entry from the list, and panic if we cannot
get it. Instead, traverse through the whole list, trying to find an
entry we can successfully get. This introduces the helper function
afs_GetDSlotFromList to do this traversal.

This does not yet address the case where we cannot get any entry on
the relevant list.

Change-Id: Iedbcffcbeb5dda61fde8e1d526e793f68c3200b3
Reviewed-on: http://gerrit.openafs.org/8376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/afs/afs_dcache.c