You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] RPC: Make rpc_create_client() destroy the transport on failure.
This saves us a couple of lines of cleanup code for each call. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -383,7 +383,6 @@ nfs_create_client(struct nfs_server *server, const struct nfs_mount_data *data)
|
||||
return clnt;
|
||||
|
||||
out_fail:
|
||||
xprt_destroy(xprt);
|
||||
return clnt;
|
||||
}
|
||||
|
||||
@@ -1623,7 +1622,6 @@ static int nfs4_fill_super(struct super_block *sb, struct nfs4_mount_data *data,
|
||||
if (IS_ERR(clnt)) {
|
||||
up_write(&clp->cl_sem);
|
||||
printk(KERN_WARNING "NFS: cannot create RPC client.\n");
|
||||
xprt_destroy(xprt);
|
||||
err = PTR_ERR(clnt);
|
||||
goto out_fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user