提交 50719bf3 编写于 作者: C Chuck Lever

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: NDai Ngo <dai.ngo@oracle.com>
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
上级 35aff067
......@@ -4711,6 +4711,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;
......@@ -4718,11 +4726,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册