Skip to content

Commit

Permalink
NFS: Clean up nfs4_check_server_scope()
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Schumaker <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
amschuma-ntap authored and trondmypd committed Apr 20, 2017
1 parent ddfa0d4 commit 8da0f93
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions fs/nfs/nfs4client.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,18 +624,9 @@ nfs4_check_server_scope(struct nfs41_server_scope *s1,
struct nfs41_server_scope *s2)
{
if (s1->server_scope_sz != s2->server_scope_sz)
goto out_scope_mismatch;
if (memcmp(s1->server_scope, s2->server_scope,
s1->server_scope_sz) != 0)
goto out_scope_mismatch;

dprintk("NFS: --> %s server scopes match\n", __func__);
return true;

out_scope_mismatch:
dprintk("NFS: --> %s server scopes do not match\n",
__func__);
return false;
return false;
return memcmp(s1->server_scope, s2->server_scope,
s1->server_scope_sz) == 0;
}

/**
Expand Down

0 comments on commit 8da0f93

Please sign in to comment.