diff options
author | David Howells <dhowells@redhat.com> | 2023-10-26 09:43:23 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-12-24 15:22:53 +0000 |
commit | 2de5599f63babb416e09b1a6be429a47910dd47c (patch) | |
tree | b8f836e51db7681fbedf1e46b205d2441119f81d /fs/afs/file.c | |
parent | 075171fd22be33acf4ab354814bfa6de1c3412ce (diff) | |
download | linux-stable-2de5599f63babb416e09b1a6be429a47910dd47c.tar.gz linux-stable-2de5599f63babb416e09b1a6be429a47910dd47c.tar.bz2 linux-stable-2de5599f63babb416e09b1a6be429a47910dd47c.zip |
afs: Wrap most op->error accesses with inline funcs
Wrap most op->error accesses with inline funcs which will make it easier
for a subsequent patch to replace op->error with something else. Two
functions are added to this end:
(1) afs_op_error() - Get the error code.
(2) afs_op_set_error() - Set the error code.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Diffstat (limited to 'fs/afs/file.c')
-rw-r--r-- | fs/afs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c index d37dd201752b..0c81c39c32f5 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -243,7 +243,7 @@ static void afs_fetch_data_notify(struct afs_operation *op) { struct afs_read *req = op->fetch.req; struct netfs_io_subrequest *subreq = req->subreq; - int error = op->error; + int error = afs_op_error(op); if (error == -ECONNABORTED) error = afs_abort_to_error(op->ac.abort_code); @@ -271,7 +271,7 @@ static void afs_fetch_data_success(struct afs_operation *op) static void afs_fetch_data_put(struct afs_operation *op) { - op->fetch.req->error = op->error; + op->fetch.req->error = afs_op_error(op); afs_put_read(op->fetch.req); } |