[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <153685495622.16086.10265386563835390377.stgit@warthog.procyon.org.uk>
Date: Thu, 13 Sep 2018 17:09:16 +0100
From: David Howells <dhowells@...hat.com>
To: viro@...iv.linux.org.uk
Cc: dhowells@...hat.com, linux-afs@...ts.infradead.org,
keyrings@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/6] afs: afs_end_vnode_operation() needs to translate abort
codes to errors
afs_end_vnode_operation() calls the function to translate an abort code
into an error return, but never actually assigns the error.
Fix this by storing the looked up error back into the cursor.
Signed-off-by: David Howells <dhowells@...hat.com>
---
fs/afs/rotate.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c
index 1faef56b12bd..add0dbb18763 100644
--- a/fs/afs/rotate.c
+++ b/fs/afs/rotate.c
@@ -512,7 +512,6 @@ bool afs_select_current_fileserver(struct afs_fs_cursor *fc)
int afs_end_vnode_operation(struct afs_fs_cursor *fc)
{
struct afs_net *net = afs_v2net(fc->vnode);
- int ret;
mutex_unlock(&fc->vnode->io_lock);
@@ -520,9 +519,8 @@ int afs_end_vnode_operation(struct afs_fs_cursor *fc)
afs_put_cb_interest(net, fc->cbi);
afs_put_serverlist(net, fc->server_list);
- ret = fc->ac.error;
- if (ret == -ECONNABORTED)
- afs_abort_to_error(fc->ac.abort_code);
+ if (fc->ac.error == -ECONNABORTED)
+ fc->ac.error = afs_abort_to_error(fc->ac.abort_code);
return fc->ac.error;
}
Powered by blists - more mailing lists