diff options
author | Olga Kornievskaia <kolga@netapp.com> | 2021-12-09 20:53:29 +0100 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2022-01-12 20:26:05 +0100 |
commit | 90e12a3191040bd3854d3e236c35921e4e92a044 (patch) | |
tree | f74b74bc531b6bd4e14d4147ff31e8ef2498b56f /fs/nfs/nfs4state.c | |
parent | NFSv4: nfs_atomic_open() can race when looking up a non-regular file (diff) | |
download | linux-90e12a3191040bd3854d3e236c35921e4e92a044.tar.xz linux-90e12a3191040bd3854d3e236c35921e4e92a044.zip |
NFSv4 remove zero number of fs_locations entries error check
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>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index f63dfa01001c..f3265575c28d 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -2106,6 +2106,9 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred } result = -NFS4ERR_NXIO; + if (!locations->nlocations) + goto out; + if (!(locations->fattr.valid & NFS_ATTR_FATTR_V4_LOCATIONS)) { dprintk("<-- %s: No fs_locations data, migration skipped\n", __func__); |