From nobody Tue Dec 16 06:48:48 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3385C4332F for ; Thu, 9 Nov 2023 15:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343865AbjKIPmk (ORCPT ); Thu, 9 Nov 2023 10:42:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344174AbjKIPmW (ORCPT ); Thu, 9 Nov 2023 10:42:22 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A25335B0 for ; Thu, 9 Nov 2023 07:40:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699544444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i2zA9f9ia2SQ7Ox+GrjuXX78/9x+ajhYh+AqbaMvgmA=; b=VC3BrTyGxkLRX/3S77ANTYGd4a+fcLYGkDklWAKfOaOk85MnN9ZgD7B2CxCXB3BQ4mMpl5 muD5rCM7j2v/HjYTOUq1DuvCPyDvl0SJ0EWKhzelYOiyyOPxq8nYuWSh5LydGqmNgJPYV6 AcHd3vpPlWNAlR2gN7uZ53pRcRUe+Hs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-507-iC_HvyHoPy2J9XFdBh28hw-1; Thu, 09 Nov 2023 10:40:43 -0500 X-MC-Unique: iC_HvyHoPy2J9XFdBh28hw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25A1E2801448; Thu, 9 Nov 2023 15:40:40 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C58D40C6EBC; Thu, 9 Nov 2023 15:40:39 +0000 (UTC) From: David Howells To: Marc Dionne Cc: David Howells , linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/41] afs: Wrap most op->error accesses with inline funcs Date: Thu, 9 Nov 2023 15:39:39 +0000 Message-ID: <20231109154004.3317227-17-dhowells@redhat.com> In-Reply-To: <20231109154004.3317227-1-dhowells@redhat.com> References: <20231109154004.3317227-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 cc: Marc Dionne cc: linux-afs@lists.infradead.org --- fs/afs/dir.c | 38 +++++++++++++++--------------- fs/afs/file.c | 4 ++-- fs/afs/fs_operation.c | 21 ++++++++++------- fs/afs/fsclient.c | 2 +- fs/afs/inode.c | 2 +- fs/afs/internal.h | 20 ++++++++++++---- fs/afs/rotate.c | 55 ++++++++++++++++++++++++------------------- fs/afs/server.c | 6 ++--- fs/afs/write.c | 6 ++--- 9 files changed, 87 insertions(+), 67 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 5219182e52e1..b40f7ae850a8 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -878,14 +878,14 @@ static struct inode *afs_do_lookup(struct inode *dir,= struct dentry *dentry, * lookups contained therein are stored in the reply without aborting * the whole operation. */ - op->error =3D -ENOTSUPP; + afs_op_set_error(op, -ENOTSUPP); if (!cookie->one_only) { op->ops =3D &afs_inline_bulk_status_operation; afs_begin_vnode_operation(op); afs_wait_for_operation(op); } =20 - if (op->error =3D=3D -ENOTSUPP) { + if (afs_op_error(op) =3D=3D -ENOTSUPP) { /* We could try FS.BulkStatus next, but this aborts the entire * op if any of the lookups fails - so, for the moment, revert * to FS.FetchStatus for op->file[1]. @@ -895,10 +895,10 @@ static struct inode *afs_do_lookup(struct inode *dir,= struct dentry *dentry, afs_begin_vnode_operation(op); afs_wait_for_operation(op); } - inode =3D ERR_PTR(op->error); + inode =3D ERR_PTR(afs_op_error(op)); =20 out_op: - if (op->error =3D=3D 0) { + if (!afs_op_error(op)) { inode =3D &op->file[1].vnode->netfs.inode; op->file[1].vnode =3D NULL; } @@ -1273,7 +1273,7 @@ static void afs_vnode_new_inode(struct afs_operation = *op) =20 _enter(""); =20 - ASSERTCMP(op->error, =3D=3D, 0); + ASSERTCMP(afs_op_error(op), =3D=3D, 0); =20 inode =3D afs_iget(op, vp); if (IS_ERR(inode)) { @@ -1286,7 +1286,7 @@ static void afs_vnode_new_inode(struct afs_operation = *op) =20 vnode =3D AFS_FS_I(inode); set_bit(AFS_VNODE_NEW_CONTENT, &vnode->flags); - if (!op->error) + if (!afs_op_error(op)) afs_cache_permit(vnode, op->key, vnode->cb_break, &vp->scb); d_instantiate(op->dentry, inode); } @@ -1320,7 +1320,7 @@ static void afs_create_put(struct afs_operation *op) { _enter("op=3D%08x", op->debug_id); =20 - if (op->error) + if (afs_op_error(op)) d_drop(op->dentry); } =20 @@ -1480,7 +1480,7 @@ static void afs_dir_remove_link(struct afs_operation = *op) struct dentry *dentry =3D op->dentry; int ret; =20 - if (op->error !=3D 0 || + if (afs_op_error(op) || (op->file[1].scb.have_status && op->file[1].scb.have_error)) return; if (d_really_is_positive(dentry)) @@ -1504,10 +1504,10 @@ static void afs_dir_remove_link(struct afs_operatio= n *op) =20 ret =3D afs_validate(vnode, op->key); if (ret !=3D -ESTALE) - op->error =3D ret; + afs_op_set_error(op, ret); } =20 - _debug("nlink %d [val %d]", vnode->netfs.inode.i_nlink, op->error); + _debug("nlink %d [val %d]", vnode->netfs.inode.i_nlink, afs_op_error(op)); } =20 static void afs_unlink_success(struct afs_operation *op) @@ -1538,7 +1538,7 @@ static void afs_unlink_edit_dir(struct afs_operation = *op) static void afs_unlink_put(struct afs_operation *op) { _enter("op=3D%08x", op->debug_id); - if (op->unlink.need_rehash && op->error < 0 && op->error !=3D -ENOENT) + if (op->unlink.need_rehash && afs_op_error(op) < 0 && afs_op_error(op) != =3D -ENOENT) d_rehash(op->dentry); } =20 @@ -1579,7 +1579,7 @@ static int afs_unlink(struct inode *dir, struct dentr= y *dentry) /* Try to make sure we have a callback promise on the victim. */ ret =3D afs_validate(vnode, op->key); if (ret < 0) { - op->error =3D ret; + afs_op_set_error(op, ret); goto error; } =20 @@ -1588,7 +1588,7 @@ static int afs_unlink(struct inode *dir, struct dentr= y *dentry) spin_unlock(&dentry->d_lock); /* Start asynchronous writeout of the inode */ write_inode_now(d_inode(dentry), 0); - op->error =3D afs_sillyrename(dvnode, vnode, dentry, op->key); + afs_op_set_error(op, afs_sillyrename(dvnode, vnode, dentry, op->key)); goto error; } if (!d_unhashed(dentry)) { @@ -1609,7 +1609,7 @@ static int afs_unlink(struct inode *dir, struct dentr= y *dentry) /* If there was a conflict with a third party, check the status of the * unlinked vnode. */ - if (op->error =3D=3D 0 && (op->flags & AFS_OPERATION_DIR_CONFLICT)) { + if (afs_op_error(op) =3D=3D 0 && (op->flags & AFS_OPERATION_DIR_CONFLICT)= ) { op->file[1].update_ctime =3D false; op->fetch_status.which =3D 1; op->ops =3D &afs_fetch_status_operation; @@ -1691,7 +1691,7 @@ static void afs_link_success(struct afs_operation *op) static void afs_link_put(struct afs_operation *op) { _enter("op=3D%08x", op->debug_id); - if (op->error) + if (afs_op_error(op)) d_drop(op->dentry); } =20 @@ -1889,7 +1889,7 @@ static void afs_rename_put(struct afs_operation *op) if (op->rename.rehash) d_rehash(op->rename.rehash); dput(op->rename.tmp); - if (op->error) + if (afs_op_error(op)) d_rehash(op->dentry); } =20 @@ -1934,7 +1934,7 @@ static int afs_rename(struct mnt_idmap *idmap, struct= inode *old_dir, return PTR_ERR(op); =20 ret =3D afs_validate(vnode, op->key); - op->error =3D ret; + afs_op_set_error(op, ret); if (ret < 0) goto error; =20 @@ -1971,7 +1971,7 @@ static int afs_rename(struct mnt_idmap *idmap, struct= inode *old_dir, op->rename.tmp =3D d_alloc(new_dentry->d_parent, &new_dentry->d_name); if (!op->rename.tmp) { - op->error =3D -ENOMEM; + afs_op_nomem(op); goto error; } =20 @@ -1979,7 +1979,7 @@ static int afs_rename(struct mnt_idmap *idmap, struct= inode *old_dir, AFS_FS_I(d_inode(new_dentry)), new_dentry, op->key); if (ret) { - op->error =3D ret; + afs_op_set_error(op, ret); goto error; } =20 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 =3D op->fetch.req; struct netfs_io_subrequest *subreq =3D req->subreq; - int error =3D op->error; + int error =3D afs_op_error(op); =20 if (error =3D=3D -ECONNABORTED) error =3D afs_abort_to_error(op->ac.abort_code); @@ -271,7 +271,7 @@ static void afs_fetch_data_success(struct afs_operation= *op) =20 static void afs_fetch_data_put(struct afs_operation *op) { - op->fetch.req->error =3D op->error; + op->fetch.req->error =3D afs_op_error(op); afs_put_read(op->fetch.req); } =20 diff --git a/fs/afs/fs_operation.c b/fs/afs/fs_operation.c index 3e31fae9a149..bfb9a7634bd9 100644 --- a/fs/afs/fs_operation.c +++ b/fs/afs/fs_operation.c @@ -40,8 +40,8 @@ struct afs_operation *afs_alloc_operation(struct key *key= , struct afs_volume *vo op->net =3D volume->cell->net; op->cb_v_break =3D volume->cb_v_break; op->debug_id =3D atomic_inc_return(&afs_operation_debug_counter); - op->error =3D -EDESTADDRREQ; op->nr_iterations =3D -1; + afs_op_set_error(op, -EDESTADDRREQ); =20 _leave(" =3D [op=3D%08x]", op->debug_id); return op; @@ -71,7 +71,7 @@ static bool afs_get_io_locks(struct afs_operation *op) swap(vnode, vnode2); =20 if (mutex_lock_interruptible(&vnode->io_lock) < 0) { - op->error =3D -ERESTARTSYS; + afs_op_set_error(op, -ERESTARTSYS); op->flags |=3D AFS_OPERATION_STOP; _leave(" =3D f [I 0]"); return false; @@ -80,7 +80,7 @@ static bool afs_get_io_locks(struct afs_operation *op) =20 if (vnode2) { if (mutex_lock_interruptible_nested(&vnode2->io_lock, 1) < 0) { - op->error =3D -ERESTARTSYS; + afs_op_set_error(op, -ERESTARTSYS); op->flags |=3D AFS_OPERATION_STOP; mutex_unlock(&vnode->io_lock); op->flags &=3D ~AFS_OPERATION_LOCK_0; @@ -159,11 +159,14 @@ static void afs_end_vnode_operation(struct afs_operat= ion *op) { _enter(""); =20 - if (op->error =3D=3D -EDESTADDRREQ || - op->error =3D=3D -EADDRNOTAVAIL || - op->error =3D=3D -ENETUNREACH || - op->error =3D=3D -EHOSTUNREACH) + switch (afs_op_error(op)) { + case -EDESTADDRREQ: + case -EADDRNOTAVAIL: + case -ENETUNREACH: + case -EHOSTUNREACH: afs_dump_edestaddrreq(op); + break; + } =20 afs_drop_io_locks(op); =20 @@ -209,7 +212,7 @@ void afs_wait_for_operation(struct afs_operation *op) =20 afs_end_vnode_operation(op); =20 - if (op->error =3D=3D 0 && op->ops->edit_dir) { + if (!afs_op_error(op) && op->ops->edit_dir) { _debug("edit_dir"); op->ops->edit_dir(op); } @@ -221,7 +224,7 @@ void afs_wait_for_operation(struct afs_operation *op) */ int afs_put_operation(struct afs_operation *op) { - int i, ret =3D op->error; + int i, ret =3D afs_op_error(op); =20 _enter("op=3D%08x,%d", op->debug_id, ret); =20 diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 7d37f63ef0f0..6821ce0f9d63 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c @@ -1899,7 +1899,7 @@ void afs_fs_inline_bulk_status(struct afs_operation *= op) int i; =20 if (test_bit(AFS_SERVER_FL_NO_IBULK, &op->server->flags)) { - op->error =3D -ENOTSUPP; + afs_op_set_error(op, -ENOTSUPP); return; } =20 diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 1c794a1896aa..b3d76faa83c0 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -331,7 +331,7 @@ static void afs_fetch_status_success(struct afs_operati= on *op) =20 if (vnode->netfs.inode.i_state & I_NEW) { ret =3D afs_inode_init_from_status(op, vp, vnode); - op->error =3D ret; + afs_op_set_error(op, ret); if (ret =3D=3D 0) afs_cache_permit(vnode, op->key, vp->cb_break_before, &vp->scb); } else { diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 3739110fc0b5..08026dfd4421 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -1139,11 +1139,6 @@ extern bool afs_begin_vnode_operation(struct afs_ope= ration *); extern void afs_wait_for_operation(struct afs_operation *); extern int afs_do_sync_operation(struct afs_operation *); =20 -static inline void afs_op_nomem(struct afs_operation *op) -{ - op->error =3D -ENOMEM; -} - static inline void afs_op_set_vnode(struct afs_operation *op, unsigned int= n, struct afs_vnode *vnode) { @@ -1237,6 +1232,21 @@ static inline void __afs_stat(atomic_t *s) extern int afs_abort_to_error(u32); extern void afs_prioritise_error(struct afs_error *, int, u32); =20 +static inline void afs_op_nomem(struct afs_operation *op) +{ + op->error =3D -ENOMEM; +} + +static inline int afs_op_error(const struct afs_operation *op) +{ + return op->error; +} + +static inline int afs_op_set_error(struct afs_operation *op, int error) +{ + return op->error =3D error; +} + /* * mntpt.c */ diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c index beb9fd4e8f44..282f9417f17d 100644 --- a/fs/afs/rotate.c +++ b/fs/afs/rotate.c @@ -51,7 +51,7 @@ static bool afs_start_fs_iteration(struct afs_operation *= op, * and have to return an error. */ if (op->flags & AFS_OPERATION_CUR_ONLY) { - op->error =3D -ESTALE; + afs_op_set_error(op, -ESTALE); return false; } =20 @@ -93,7 +93,7 @@ static bool afs_sleep_and_retry(struct afs_operation *op) if (!(op->flags & AFS_OPERATION_UNINTR)) { msleep_interruptible(1000); if (signal_pending(current)) { - op->error =3D -ERESTARTSYS; + afs_op_set_error(op, -ERESTARTSYS); return false; } } else { @@ -137,7 +137,7 @@ bool afs_select_fileserver(struct afs_operation *op) case 0: default: /* Success or local failure. Stop. */ - op->error =3D error; + afs_op_set_error(op, error); op->flags |=3D AFS_OPERATION_STOP; _leave(" =3D f [okay/local %d]", error); return false; @@ -174,11 +174,13 @@ bool afs_select_fileserver(struct afs_operation *op) =20 set_bit(AFS_VOLUME_NEEDS_UPDATE, &op->volume->flags); error =3D afs_check_volume_status(op->volume, op); - if (error < 0) - goto failed_set_error; + if (error < 0) { + afs_op_set_error(op, error); + goto failed; + } =20 if (test_bit(AFS_VOLUME_DELETED, &op->volume->flags)) { - op->error =3D -ENOMEDIUM; + afs_op_set_error(op, -ENOMEDIUM); goto failed; } =20 @@ -250,11 +252,11 @@ bool afs_select_fileserver(struct afs_operation *op) clear_bit(AFS_VOLUME_BUSY, &op->volume->flags); } if (op->flags & AFS_OPERATION_NO_VSLEEP) { - op->error =3D -EADV; + afs_op_set_error(op, -EADV); goto failed; } if (op->flags & AFS_OPERATION_CUR_ONLY) { - op->error =3D -ESTALE; + afs_op_set_error(op, -ESTALE); goto failed; } goto busy; @@ -274,7 +276,7 @@ bool afs_select_fileserver(struct afs_operation *op) * lock we need to maintain. */ if (op->flags & AFS_OPERATION_NO_VSLEEP) { - op->error =3D -EBUSY; + afs_op_set_error(op, -EBUSY); goto failed; } if (!test_and_set_bit(AFS_VOLUME_BUSY, &op->volume->flags)) { @@ -303,7 +305,7 @@ bool afs_select_fileserver(struct afs_operation *op) * honour, just in case someone sets up a loop. */ if (op->flags & AFS_OPERATION_VMOVED) { - op->error =3D -EREMOTEIO; + afs_op_set_error(op, -EREMOTEIO); goto failed; } op->flags |=3D AFS_OPERATION_VMOVED; @@ -311,8 +313,10 @@ bool afs_select_fileserver(struct afs_operation *op) set_bit(AFS_VOLUME_WAIT, &op->volume->flags); set_bit(AFS_VOLUME_NEEDS_UPDATE, &op->volume->flags); error =3D afs_check_volume_status(op->volume, op); - if (error < 0) - goto failed_set_error; + if (error < 0) { + afs_op_set_error(op, error); + goto failed; + } =20 /* If the server list didn't change, then the VLDB is * out of sync with the fileservers. This is hopefully @@ -342,7 +346,7 @@ bool afs_select_fileserver(struct afs_operation *op) * Translate locally and return ENOSPC. * No replicas to failover to. */ - op->error =3D -ENOSPC; + afs_op_set_error(op, -ENOSPC); goto failed_but_online; =20 case VOVERQUOTA: @@ -351,7 +355,7 @@ bool afs_select_fileserver(struct afs_operation *op) * Translate locally and return EDQUOT. * No replicas to failover to. */ - op->error =3D -EDQUOT; + afs_op_set_error(op, -EDQUOT); goto failed_but_online; =20 default: @@ -364,7 +368,7 @@ bool afs_select_fileserver(struct afs_operation *op) =20 case -ETIMEDOUT: case -ETIME: - if (op->error !=3D -EDESTADDRREQ) + if (afs_op_error(op) !=3D -EDESTADDRREQ) goto iterate_address; fallthrough; case -ERFKILL: @@ -383,7 +387,7 @@ bool afs_select_fileserver(struct afs_operation *op) fallthrough; case -ECONNRESET: _debug("call reset"); - op->error =3D error; + afs_op_set_error(op, error); goto failed; } =20 @@ -399,8 +403,10 @@ bool afs_select_fileserver(struct afs_operation *op) * volume may have moved or even have been deleted. */ error =3D afs_check_volume_status(op->volume, op); - if (error < 0) - goto failed_set_error; + if (error < 0) { + afs_op_set_error(op, error); + goto failed; + } =20 if (!afs_start_fs_iteration(op, vnode)) goto failed; @@ -411,8 +417,10 @@ bool afs_select_fileserver(struct afs_operation *op) _debug("pick [%lx]", op->untried); =20 error =3D afs_wait_for_fs_probes(op->server_list, op->untried); - if (error < 0) - goto failed_set_error; + if (error < 0) { + afs_op_set_error(op, error); + goto failed; + } =20 /* Pick the untried server with the lowest RTT. If we have outstanding * callbacks, we stick with the server we're already using if we can. @@ -513,7 +521,8 @@ bool afs_select_fileserver(struct afs_operation *op) op->flags &=3D ~AFS_OPERATION_RETRY_SERVER; goto retry_server; case -ERESTARTSYS: - goto failed_set_error; + afs_op_set_error(op, error); + goto failed; case -ETIME: case -EDESTADDRREQ: goto next_server; @@ -542,13 +551,11 @@ bool afs_select_fileserver(struct afs_operation *op) } =20 error =3D e.error; - -failed_set_error: op->error =3D error; failed: op->flags |=3D AFS_OPERATION_STOP; afs_end_cursor(&op->ac); - _leave(" =3D f [failed %d]", op->error); + _leave(" =3D f [failed %d]", afs_op_error(op)); return false; } =20 diff --git a/fs/afs/server.c b/fs/afs/server.c index 831254d8ef9c..a72192566dda 100644 --- a/fs/afs/server.c +++ b/fs/afs/server.c @@ -628,8 +628,8 @@ static noinline bool afs_update_server_record(struct af= s_operation *op, _leave(" =3D t [intr]"); return true; } - op->error =3D PTR_ERR(alist); - _leave(" =3D f [%d]", op->error); + afs_op_set_error(op, PTR_ERR(alist)); + _leave(" =3D f [%d]", afs_op_error(op)); return false; } =20 @@ -683,7 +683,7 @@ bool afs_check_server_record(struct afs_operation *op, = struct afs_server *server (op->flags & AFS_OPERATION_UNINTR) ? TASK_UNINTERRUPTIBLE : TASK_INTERRUPTIBLE); if (ret =3D=3D -ERESTARTSYS) { - op->error =3D ret; + afs_op_set_error(op, ret); _leave(" =3D f [intr]"); return false; } diff --git a/fs/afs/write.c b/fs/afs/write.c index e1c45341719b..953f2c581afa 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -366,7 +366,7 @@ static void afs_store_data_success(struct afs_operation= *op) =20 op->ctime =3D op->file[0].scb.status.mtime_client; afs_vnode_commit_status(op, &op->file[0]); - if (op->error =3D=3D 0) { + if (!afs_op_error(op)) { if (!op->store.laundering) afs_pages_written_back(vnode, op->store.pos, op->store.size); afs_stat_v(vnode, n_stores); @@ -428,7 +428,7 @@ static int afs_store_data(struct afs_vnode *vnode, stru= ct iov_iter *iter, loff_t =20 afs_wait_for_operation(op); =20 - switch (op->error) { + switch (afs_op_error(op)) { case -EACCES: case -EPERM: case -ENOKEY: @@ -447,7 +447,7 @@ static int afs_store_data(struct afs_vnode *vnode, stru= ct iov_iter *iter, loff_t } =20 afs_put_wb_key(wbk); - _leave(" =3D %d", op->error); + _leave(" =3D %d", afs_op_error(op)); return afs_put_operation(op); }