afs: Handle easy GetValidDSlot errors
authorAndrew Deason <adeason@sinenomine.net>
Thu, 1 Nov 2012 16:51:42 +0000 (11:51 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 13 Nov 2012 18:37:45 +0000 (10:37 -0800)
commitf74a0a7bbb37a8ab6050e833cf8d66abdff31854
tree63bd8f14a4f967b9ac309f5976abb5c0d0c45c4e
parent20b0c65a289e2b55fb6922c8f60e873f1f4c6f97
afs: Handle easy GetValidDSlot errors

Many callers of GetValidDSlot currently assume they will always get
back a valid dcache, and will panic on getting NULL. However, for many
of these callers, handling the NULL case is quite easy, since the
failure to get a dcache can just result in an error directly, or
obtaining the dcache is best-effort or just an optimization.

This commit just handles the "easy" cases; some other callers require
more complex handling.

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