Skip to content

Commit 50719bf

Browse files
committed
NFSD: Fix nfsd_breaker_owns_lease() return values
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 <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 35aff06 commit 50719bf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

fs/nfsd/nfs4state.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4711,18 +4711,26 @@ nfsd_break_deleg_cb(struct file_lock *fl)
47114711
return ret;
47124712
}
47134713

4714+
/**
4715+
* nfsd_breaker_owns_lease - Check if lease conflict was resolved
4716+
* @fl: Lock state to check
4717+
*
4718+
* Return values:
4719+
* %true: Lease conflict was resolved
4720+
* %false: Lease conflict was not resolved.
4721+
*/
47144722
static bool nfsd_breaker_owns_lease(struct file_lock *fl)
47154723
{
47164724
struct nfs4_delegation *dl = fl->fl_owner;
47174725
struct svc_rqst *rqst;
47184726
struct nfs4_client *clp;
47194727

47204728
if (!i_am_nfsd())
4721-
return NULL;
4729+
return false;
47224730
rqst = kthread_data(current);
47234731
/* Note rq_prog == NFS_ACL_PROGRAM is also possible: */
47244732
if (rqst->rq_prog != NFS_PROGRAM || rqst->rq_vers < 4)
4725-
return NULL;
4733+
return false;
47264734
clp = *(rqst->rq_lease_breaker);
47274735
return dl->dl_stid.sc_client == clp;
47284736
}

0 commit comments

Comments
 (0)