NFS: Clean up _nfs4_is_integrity_protected()
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 11 Jan 2017 21:01:21 +0000 (16:01 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 30 Jan 2017 18:14:50 +0000 (13:14 -0500)
We can cut out the if statement and return the results of the comparison
directly.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index 328eda9e6db1a291f3f4f3ab9b2e5ed726bc8d9c..3f5d4fd4e95a4f8babd4640126e18fac54ba18b1 100644 (file)
@@ -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)