NFSv4 remove zero number of fs_locations entries error check
[ Upstream commit 90e12a3191040bd3854d3e236c35921e4e92a044 ] Remove the check for the zero length fs_locations reply in the xdr decoding, and instead check for that in the migration code. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
1c79aad118
commit
5a9c613a29
@@ -2104,6 +2104,9 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = -NFS4ERR_NXIO;
|
result = -NFS4ERR_NXIO;
|
||||||
|
if (!locations->nlocations)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (!(locations->fattr.valid & NFS_ATTR_FATTR_V4_LOCATIONS)) {
|
if (!(locations->fattr.valid & NFS_ATTR_FATTR_V4_LOCATIONS)) {
|
||||||
dprintk("<-- %s: No fs_locations data, migration skipped\n",
|
dprintk("<-- %s: No fs_locations data, migration skipped\n",
|
||||||
__func__);
|
__func__);
|
||||||
|
@@ -3680,8 +3680,6 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st
|
|||||||
if (unlikely(!p))
|
if (unlikely(!p))
|
||||||
goto out_eio;
|
goto out_eio;
|
||||||
n = be32_to_cpup(p);
|
n = be32_to_cpup(p);
|
||||||
if (n <= 0)
|
|
||||||
goto out_eio;
|
|
||||||
for (res->nlocations = 0; res->nlocations < n; res->nlocations++) {
|
for (res->nlocations = 0; res->nlocations < n; res->nlocations++) {
|
||||||
u32 m;
|
u32 m;
|
||||||
struct nfs4_fs_location *loc;
|
struct nfs4_fs_location *loc;
|
||||||
|
Reference in New Issue
Block a user