afs: Detect VIOCPREFETCH special case properly 01/13301/6
authorAndrew Deason <adeason@sinenomine.net>
Fri, 24 Aug 2018 18:03:24 +0000 (13:03 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 2 Apr 2020 04:29:32 +0000 (00:29 -0400)
commit252b3bcc75ea141ff93a7b3147865f4b952fcaca
tree3d1f856e51a1fee7c488b505f47a2301674f1f8a
parent66d0f91791695ac585f0511d0dadafd4e570b1bf
afs: Detect VIOCPREFETCH special case properly

Currently, afs_syscall_pioctl handles the VIOCPREFETCH pioctl as a
special case, calling into a different code path to handle
backgrounding the prefetch operation. However, we detect that we're
handling a VIOCPREFETCH operation just by looking at the lower 8 bits
of the given opcode. This means that any pioctl that ends in 0x0F will
trigger this codepath, such as if we add a 'C' or 'O' pioctl that uses
code 0x0F.

We only want to catch VIOCPREFETCH requests for this code path, so fix
the check to also check if we're processing a 'V' pioctl.

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