Skip to content

Commit

Permalink
NFS: Clean up _nfs4_is_integrity_protected()
Browse files Browse the repository at this point in the history
We can cut out the if statement and return the results of the comparison
directly.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Anna Schumaker authored and Anna Schumaker committed Jan 30, 2017
1 parent d9b67e1 commit eeea536
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,7 @@ nfs4_async_handle_error(struct rpc_task *task, struct nfs_server *server,
static bool _nfs4_is_integrity_protected(struct nfs_client *clp)
{
rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor;

if (flavor == RPC_AUTH_GSS_KRB5I ||
flavor == RPC_AUTH_GSS_KRB5P)
return true;

return false;
return (flavor == RPC_AUTH_GSS_KRB5I) || (flavor == RPC_AUTH_GSS_KRB5P);
}

static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp)
Expand Down

0 comments on commit eeea536

Please sign in to comment.