Skip to content
Commit c875c76a authored by David Howells's avatar David Howells
Browse files

afs: Fix a Sparse warning in xdr_decode_AFSFetchStatus()



Sparse doesn't appear able to handle the conditionally-taken locks in
xdr_decode_AFSFetchStatus(), even though the lock and unlock are both
contingent on the same unvarying function argument.

Deal with this by interpolating a wrapper function that takes the lock if
needed and calls xdr_decode_AFSFetchStatus() on two separate branches, one
with the lock held and one without.

This allows Sparse to work out the locking.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 564def71
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment