mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 20:58:14 -04:00
NFS: cleanup error handling in nfs4_server_common_setup
Return error directly instead of using a goto label for it. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250718081509.2607553-2-hch@lst.de Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
committed by
Trond Myklebust
parent
f06bedfa62
commit
67173860a7
@@ -1103,14 +1103,14 @@ static int nfs4_server_common_setup(struct nfs_server *server,
|
||||
/* We must ensure the session is initialised first */
|
||||
error = nfs4_init_session(server->nfs_client);
|
||||
if (error < 0)
|
||||
goto out;
|
||||
return error;
|
||||
|
||||
nfs4_server_set_init_caps(server);
|
||||
|
||||
/* Probe the root fh to retrieve its FSID and filehandle */
|
||||
error = nfs4_get_rootfh(server, mntfh, auth_probe);
|
||||
if (error < 0)
|
||||
goto out;
|
||||
return error;
|
||||
|
||||
dprintk("Server FSID: %llx:%llx\n",
|
||||
(unsigned long long) server->fsid.major,
|
||||
@@ -1119,7 +1119,7 @@ static int nfs4_server_common_setup(struct nfs_server *server,
|
||||
|
||||
error = nfs_probe_server(server, mntfh);
|
||||
if (error < 0)
|
||||
goto out;
|
||||
return error;
|
||||
|
||||
nfs4_session_limit_rwsize(server);
|
||||
nfs4_session_limit_xasize(server);
|
||||
@@ -1130,8 +1130,7 @@ static int nfs4_server_common_setup(struct nfs_server *server,
|
||||
nfs_server_insert_lists(server);
|
||||
server->mount_time = jiffies;
|
||||
server->destroy = nfs4_destroy_server;
|
||||
out:
|
||||
return error;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user