Skip to content

Commit

Permalink
afs: Use afs_extract_discard() rather than iov_iter_discard()
Browse files Browse the repository at this point in the history
Use afs_extract_discard() rather than iov_iter_discard() as the former is a
wrapper for the latter, providing a place to put tracepoints.

Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed Sep 2, 2019
1 parent 52c9c13 commit 23a2891
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fs/afs/fsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
goto no_more_data;

/* Discard any excess data the server gave us */
iov_iter_discard(&call->iter, READ, req->actual_len - req->len);
afs_extract_discard(call, req->actual_len - req->len);
call->unmarshall = 3;
/* Fall through */

Expand Down Expand Up @@ -1870,7 +1870,7 @@ static int afs_deliver_fs_get_capabilities(struct afs_call *call)

call->count = count;
call->count2 = count;
iov_iter_discard(&call->iter, READ, count * sizeof(__be32));
afs_extract_discard(call, count * sizeof(__be32));
call->unmarshall++;
/* Fall through */

Expand Down
6 changes: 3 additions & 3 deletions fs/afs/yfsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call)
goto no_more_data;

/* Discard any excess data the server gave us */
iov_iter_discard(&call->iter, READ, req->actual_len - req->len);
afs_extract_discard(call, req->actual_len - req->len);
call->unmarshall = 3;
/* Fall through */

Expand Down Expand Up @@ -2007,7 +2007,7 @@ static int yfs_deliver_fs_fetch_opaque_acl(struct afs_call *call)
acl->size = call->count2;
afs_extract_begin(call, acl->data, size);
} else {
iov_iter_discard(&call->iter, READ, size);
afs_extract_discard(call, size);
}
call->unmarshall++;
/* Fall through */
Expand Down Expand Up @@ -2039,7 +2039,7 @@ static int yfs_deliver_fs_fetch_opaque_acl(struct afs_call *call)
acl->size = call->count2;
afs_extract_begin(call, acl->data, size);
} else {
iov_iter_discard(&call->iter, READ, size);
afs_extract_discard(call, size);
}
call->unmarshall++;
/* Fall through */
Expand Down

0 comments on commit 23a2891

Please sign in to comment.