Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SUNRPC: Make cache_req::thread_wait an unsigned long

The second parameter of wait_for_completion_interruptible_timeout()
is a jiffies value whose type is "unsigned long". Avoid an
unnecessary and potentially fraught implicit type conversion at the
wait_for_completion_interruptible_timeout() call site in
cache_wait_req().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+4 -4
+4 -4
include/linux/sunrpc/cache.h
··· 121 121 struct net *net; 122 122 }; 123 123 124 - 125 124 /* this must be embedded in any request structure that 126 125 * identifies an object that will want a callback on 127 126 * a cache fill 128 127 */ 129 128 struct cache_req { 130 129 struct cache_deferred_req *(*defer)(struct cache_req *req); 131 - int thread_wait; /* How long (jiffies) we can block the 132 - * current thread to wait for updates. 133 - */ 130 + unsigned long thread_wait; /* How long (jiffies) we can block the 131 + * current thread to wait for updates. 132 + */ 134 133 }; 134 + 135 135 /* this must be embedded in a deferred_request that is being 136 136 * delayed awaiting cache-fill 137 137 */