afs_FreeDiscardedDCache: Avoid assert on error
authorAndrew Deason <adeason@sinenomine.net>
Thu, 1 Nov 2012 21:33:31 +0000 (16:33 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 13 Nov 2012 18:39:26 +0000 (10:39 -0800)
commit866a9fbbdd89735ab76a70cb6d6523db2b98e4c9
tree11aee1441aa5bb3bb7b09794b9d41170b66b7df7
parente02185547e316667989a100f77e68b918481b597
afs_FreeDiscardedDCache: Avoid assert on error

Currently afs_FreeDiscardedDCache will assert if it cannot read in any
discarded dcache entry to free. Return an error instead of asserting,
so the caller can figure out what to do about the error.

Adjust the callers to handle the error, or panic.
afs_MaybeFreeDiscardedDCache still just panics anyway, as making it
handle the error gracefully is beyond the scope of this commit, and is
work for another day.

This changes afs_FreeDiscardedDCache to return an int.

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