LINUX: Propagate afs_linux_readdir BlobScan errors 30/13430/3
authorAndrew Deason <adeason@sinenomine.net>
Thu, 17 Jan 2019 05:44:58 +0000 (23:44 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 11 Feb 2019 18:11:31 +0000 (13:11 -0500)
commit63f015d05293cd853dbd44e5115e6b378644dfb6
tree776885c15c74ce99d06f3425c7518de6a2ec5b78
parent2e556c0f23ae439c804352cf51fcf30878b03c7a
LINUX: Propagate afs_linux_readdir BlobScan errors

In afs_linux_readdir, if we detect an error code from BlobScan,
currently we 'break' out of the current while() loop. But right after
this loop, we reset 'code' to 0, ignoring the error we just got from
BlobScan, and acting like we just reached the end of the directory.

This means that if BlobScan could not process the given directory at
all, we'll just fail to iterate through some of the entries in the
given directory, and not report an error.

To fix this, process errors from BlobScan like we do for
afs_dir_GetVerifiedBlob, and return an error code and log a message
about the corrupted dir.

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