afs: avoid panic in DNew when afs_WriteDCache fails 04/13804/13
authorMark Vitale <mvitale@sinenomine.net>
Fri, 19 Jul 2019 18:41:55 +0000 (14:41 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 6 Nov 2020 20:51:35 +0000 (15:51 -0500)
commitaed4a0c4b91c5ce185547e83bfff443f3d3831f9
treecb2d6d8e6409a3aaf016bf0d1e3caf24878c2d31
parent1c04036b3425525cd94a9c9c47ca93de05c11c40
afs: avoid panic in DNew when afs_WriteDCache fails

afs_WriteDCache may fail for an IO error, or if interrupted (EINTR).
Unfortunately, DNew will panic in this case, crashing the entire
machine.

In order to avoid an outage in this case, don't panic.  Instead, reflect
the error back to the caller of DNew.

While here, add Doxygen comments to DNew.

Change-Id: I27a8f89bab979c5691dded70e8b9eacbe8aff4fd
Reviewed-on: https://gerrit.openafs.org/13804
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_buffer.c