summaryrefslogtreecommitdiffstats
path: root/fs/afs/server.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-10-26 09:43:23 +0100
committerDavid Howells <dhowells@redhat.com>2023-12-24 15:22:53 +0000
commit2de5599f63babb416e09b1a6be429a47910dd47c (patch)
treeb8f836e51db7681fbedf1e46b205d2441119f81d /fs/afs/server.c
parent075171fd22be33acf4ab354814bfa6de1c3412ce (diff)
downloadlinux-2de5599f63babb416e09b1a6be429a47910dd47c.tar.gz
linux-2de5599f63babb416e09b1a6be429a47910dd47c.tar.bz2
linux-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/server.c')
-rw-r--r--fs/afs/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/afs/server.c b/fs/afs/server.c
index 5b5fa94005c9..2826e6eced71 100644
--- a/fs/afs/server.c
+++ b/fs/afs/server.c
@@ -629,8 +629,8 @@ static noinline bool afs_update_server_record(struct afs_operation *op,
_leave(" = t [intr]");
return true;
}
- op->error = PTR_ERR(alist);
- _leave(" = f [%d]", op->error);
+ afs_op_set_error(op, PTR_ERR(alist));
+ _leave(" = f [%d]", afs_op_error(op));
return false;
}
@@ -684,7 +684,7 @@ wait:
(op->flags & AFS_OPERATION_UNINTR) ?
TASK_UNINTERRUPTIBLE : TASK_INTERRUPTIBLE);
if (ret == -ERESTARTSYS) {
- op->error = ret;
+ afs_op_set_error(op, ret);
_leave(" = f [intr]");
return false;
}