Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffba718e authored by David Howells's avatar David Howells
Browse files

afs: Get rid of afs_call::reply[]



Replace the afs_call::reply[] array with a bunch of typed members so that
the compiler can use type-checking on them.  It's also easier for the eye
to see what's going on.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent fefb2483
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ static int afs_find_cm_server_by_peer(struct afs_call *call)
		return 0;
	}

	call->cm_server = server;
	call->server = server;
	return afs_record_cm_probe(call, server);
}

@@ -234,7 +234,7 @@ static int afs_find_cm_server_by_uuid(struct afs_call *call,
		return 0;
	}

	call->cm_server = server;
	call->server = server;
	return afs_record_cm_probe(call, server);
}

@@ -260,8 +260,8 @@ static void SRXAFSCB_CallBack(struct work_struct *work)
	 * server holds up change visibility till it receives our reply so as
	 * to maintain cache coherency.
	 */
	if (call->cm_server)
		afs_break_callbacks(call->cm_server, call->count, call->request);
	if (call->server)
		afs_break_callbacks(call->server, call->count, call->request);

	afs_send_empty_reply(call);
	afs_put_call(call);
@@ -376,10 +376,10 @@ static void SRXAFSCB_InitCallBackState(struct work_struct *work)
{
	struct afs_call *call = container_of(work, struct afs_call, work);

	_enter("{%p}", call->cm_server);
	_enter("{%p}", call->server);

	if (call->cm_server)
		afs_init_callback_state(call->cm_server);
	if (call->server)
		afs_init_callback_state(call->server);
	afs_send_empty_reply(call);
	afs_put_call(call);
	_leave("");
+1 −1
Original line number Diff line number Diff line
@@ -408,7 +408,7 @@ static int afs_readpage(struct file *file, struct page *page)
static void afs_readpages_page_done(struct afs_call *call, struct afs_read *req)
{
#ifdef CONFIG_AFS_FSCACHE
	struct afs_vnode *vnode = call->reply[0];
	struct afs_vnode *vnode = call->xvnode;
#endif
	struct page *page = req->pages[req->index];

+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static void afs_schedule_lock_extension(struct afs_vnode *vnode)
 */
void afs_lock_op_done(struct afs_call *call)
{
	struct afs_vnode *vnode = call->reply[0];
	struct afs_vnode *vnode = call->xvnode;

	if (call->error == 0) {
		spin_lock(&vnode->lock);
+2 −2
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ static bool afs_fs_probe_done(struct afs_server *server)
void afs_fileserver_probe_result(struct afs_call *call)
{
	struct afs_addr_list *alist = call->alist;
	struct afs_server *server = call->reply[0];
	unsigned int server_index = (long)call->reply[1];
	struct afs_server *server = call->server;
	unsigned int server_index = call->server_index;
	unsigned int index = call->addr_ix;
	unsigned int rtt = UINT_MAX;
	bool have_result = false;
+144 −143

File changed.

Preview size limit exceeded, changes collapsed.

Loading