afs: Handle easy GetValidDSlot errors
authorAndrew Deason <adeason@sinenomine.net>
Thu, 1 Nov 2012 16:51:42 +0000 (11:51 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 28 Aug 2013 15:38:26 +0000 (08:38 -0700)
commit00fd34a65c7914bfd480d892cc95e9f694e29f5f
treea521d65bfeea0f59f7b99f850d0a44fddc032085
parentbb80282ba95b23c85cc5f287ed174e37b4d374a7
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.

Reviewed-on: http://gerrit.openafs.org/8375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit f74a0a7bbb37a8ab6050e833cf8d66abdff31854)

Change-Id: Ic2c463edebcb821562541004bd4181483c90c3e6
Reviewed-on: http://gerrit.openafs.org/9287
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_dcache.c
src/afs/afs_segments.c