diff options
| author | Jakub Kicinski <[email protected]> | 2022-07-07 19:07:37 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-07-07 19:07:37 +0000 |
| commit | 83ec88d81aa8762d4fb75f95365da6b73a38efe9 (patch) | |
| tree | 193501a42e488ec81871136d19e0edb129a4a154 /fs/nfs/nfs4proc.c | |
| parent | af_unix: Optimise hash table layout. (diff) | |
| parent | Merge tag 'net-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
| download | kernel-83ec88d81aa8762d4fb75f95365da6b73a38efe9.tar.gz kernel-83ec88d81aa8762d4fb75f95365da6b73a38efe9.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
| -rw-r--r-- | fs/nfs/nfs4proc.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index c0fdcf8c0032..bb0e84a46d61 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4012,22 +4012,29 @@ static int _nfs4_discover_trunking(struct nfs_server *server, } page = alloc_page(GFP_KERNEL); + if (!page) + return -ENOMEM; locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL); - if (page == NULL || locations == NULL) - goto out; + if (!locations) + goto out_free; + locations->fattr = nfs_alloc_fattr(); + if (!locations->fattr) + goto out_free_2; status = nfs4_proc_get_locations(server, fhandle, locations, page, cred); if (status) - goto out; + goto out_free_3; for (i = 0; i < locations->nlocations; i++) test_fs_location_for_trunking(&locations->locations[i], clp, server); -out: - if (page) - __free_page(page); +out_free_3: + kfree(locations->fattr); +out_free_2: kfree(locations); +out_free: + __free_page(page); return status; } |
