NFS: Clean up _nfs4_is_integrity_protected()

We can cut out the if statement and return the results of the comparison
directly.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Anna Schumaker 2017-01-11 16:01:21 -05:00
Родитель d9b67e1e49
Коммит eeea536163
1 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -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) static bool _nfs4_is_integrity_protected(struct nfs_client *clp)
{ {
rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor; rpc_authflavor_t flavor = clp->cl_rpcclient->cl_auth->au_flavor;
return (flavor == RPC_AUTH_GSS_KRB5I) || (flavor == RPC_AUTH_GSS_KRB5P);
if (flavor == RPC_AUTH_GSS_KRB5I ||
flavor == RPC_AUTH_GSS_KRB5P)
return true;
return false;
} }
static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp) static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp)