Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp948520pxb; Wed, 6 Apr 2022 05:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxw/p3yIugQOwAJrAJSoQX+CbTQmT/jKe8+ctwV6vgIutKnYEsEJfnaU0ysMoaIcPnntOe7 X-Received: by 2002:a05:6e02:8ae:b0:2c7:90a5:90b8 with SMTP id a14-20020a056e0208ae00b002c790a590b8mr4176223ilt.19.1649246764412; Wed, 06 Apr 2022 05:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649246764; cv=none; d=google.com; s=arc-20160816; b=nBiN9lo0d6xkLvOmLIx1E7i+dzeGIGbhhHWKV7iwcblAD6bGQoWH3/uuNmb859DscO 3w7ysrVZldCOjmGcwU39c1fZKIHQAgOe2ul8KOKef+SvXpMH9DL0liEMf1AV/DEddA2I vNRew6IgBVs2gJtrAkmSkJz0EIt+eQU6sfWeH1KQvtp1sZz4rJqyqIFmdq2gEKcbjQOm igwS7xDWt8Qx39yKEZiqJXMkPm/l8/vROS87BpnS0nSHvzbeq2yOzFx+KWacZvFQGxs9 6TzAdgkuPgEdZxmijWCIUA/XB5xkKj9N0QV9iAS3jSBcBJff6yPyhpVNpHEUOw40WrAj h8MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Pgb4cgeJafblONdXMFa05+xmpFvjgcuy22YiPp7SBkw=; b=TfejJrwHihN0SBg+R6IQNreVzLCa4RWBIn6EB15odPEx1B71/3jItiSANMe+LV4IMf Zrpb7UuN1kw+W+QSUw+BTAGUvszXgqeizjfG6BIZAepkMOcUsEaEHvepdJEs9Q/KF2/I wqsm9zqhtTt8uRGQm0ZrrWIUukH7TCow5ffRWjhkBr12Jj2sybqiY0IUuhVwBiukp+HU E6U0ICcSz1CX9y3EPmRj0+d8iFBpy/buqyVnFBx67NPUFgYLwXgzXaH5nYQ+pAbKcOhj 4i8ZXmSjep76blOwUfazqKeJ33OiDKIkrFTd/P74EI9obKzqnHx5OPXOTdkwwHobrAsc l85A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NFnIRTM3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k14-20020a056e021a8e00b002ca386bf5b4si3692891ilv.76.2022.04.06.05.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:06:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NFnIRTM3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9090F496596; Wed, 6 Apr 2022 03:33:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1836379AbiDFAgB (ORCPT + 99 others); Tue, 5 Apr 2022 20:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350505AbiDEJ6o (ORCPT ); Tue, 5 Apr 2022 05:58:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF4D5D199; Tue, 5 Apr 2022 02:51:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7AB8FB818F3; Tue, 5 Apr 2022 09:51:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8416C385A2; Tue, 5 Apr 2022 09:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152269; bh=WUIYG6thePESUcULHT5I4qjXkkRS99F3jg0XOg3HOro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NFnIRTM3WFK0obBwzVDADeF2ErGZLoZErxzBqI9KLZI5pZ/bfqUfgZPFEs2RnaVSq MzUlsmMtABMGwAuLcsSsclurtRIyXrOO0MK7Zq9fp4tXmd6/Fz9vzobFxEx5HVC1Rs gf3uyjusgoDzu7R6l7HRBFkGK/GQnj73GMqlgfO0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dai Ngo , Chuck Lever , Sasha Levin Subject: [PATCH 5.15 717/913] NFSD: Fix nfsd_breaker_owns_lease() return values Date: Tue, 5 Apr 2022 09:29:39 +0200 Message-Id: <20220405070401.326185098@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuck Lever [ Upstream commit 50719bf3442dd6cd05159e9c98d020b3919ce978 ] These have been incorrect since the function was introduced. A proper kerneldoc comment is added since this function, though static, is part of an external interface. Reported-by: Dai Ngo Signed-off-by: Chuck Lever Signed-off-by: Sasha Levin --- fs/nfsd/nfs4state.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index db4a47a280dc..181bc3d9f566 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4693,6 +4693,14 @@ nfsd_break_deleg_cb(struct file_lock *fl) return ret; } +/** + * nfsd_breaker_owns_lease - Check if lease conflict was resolved + * @fl: Lock state to check + * + * Return values: + * %true: Lease conflict was resolved + * %false: Lease conflict was not resolved. + */ static bool nfsd_breaker_owns_lease(struct file_lock *fl) { struct nfs4_delegation *dl = fl->fl_owner; @@ -4700,11 +4708,11 @@ static bool nfsd_breaker_owns_lease(struct file_lock *fl) struct nfs4_client *clp; if (!i_am_nfsd()) - return NULL; + return false; rqst = kthread_data(current); /* Note rq_prog == NFS_ACL_PROGRAM is also possible: */ if (rqst->rq_prog != NFS_PROGRAM || rqst->rq_vers < 4) - return NULL; + return false; clp = *(rqst->rq_lease_breaker); return dl->dl_stid.sc_client == clp; } -- 2.34.1