Commit 316bd5e0 authored by Geliang Tang's avatar Geliang Tang Committed by Greg Kroah-Hartman
Browse files

staging: lustre: make sptlrpc_flavor_has_bulk return boolean



This patch makes sptlrpc_flavor_has_bulk return boolean, since
this function only uses either one or zero as its return value.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ebafb53
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ struct sptlrpc_rule_set {
};

int sptlrpc_parse_flavor(const char *str, struct sptlrpc_flavor *flvr);
int sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr);
bool sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr);

static inline void sptlrpc_rule_set_init(struct sptlrpc_rule_set *set)
{
+3 −3
Original line number Diff line number Diff line
@@ -2261,14 +2261,14 @@ EXPORT_SYMBOL(sec2target_str);
/*
 * return true if the bulk data is protected
 */
int sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr)
bool sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr)
{
	switch (SPTLRPC_FLVR_BULK_SVC(flvr->sf_rpc)) {
	case SPTLRPC_BULK_SVC_INTG:
	case SPTLRPC_BULK_SVC_PRIV:
		return 1;
		return true;
	default:
		return 0;
		return false;
	}
}
EXPORT_SYMBOL(sptlrpc_flavor_has_bulk);