/* Obtain client and file */
if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now check for conflicting locks */
resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock,
&resp->lock);
- if (resp->status == nlm_drop_reply)
+ if (resp->status == nlm__int__drop_reply)
rc = rpc_drop_reply;
else
dprintk("lockd: TEST4 status %d\n", ntohl(resp->status));
/* Obtain client and file */
if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to lock the file */
resp->status = nlmsvc_lock(rqstp, file, host, &argp->lock,
argp->block, &argp->cookie,
argp->reclaim);
- if (resp->status == nlm_drop_reply)
+ if (resp->status == nlm__int__drop_reply)
rc = rpc_drop_reply;
else
dprintk("lockd: LOCK status %d\n", ntohl(resp->status));
/* Obtain client and file */
if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Try to cancel request. */
resp->status = nlmsvc_cancel_blocked(SVC_NET(rqstp), file, &argp->lock);
/* Obtain client and file */
if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to remove the lock */
resp->status = nlmsvc_unlock(SVC_NET(rqstp), file, &argp->lock);
/* Obtain client and file */
if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to create the share */
resp->status = nlmsvc_share_file(host, file, argp);
/* Obtain client and file */
if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to lock the file */
resp->status = nlmsvc_unshare_file(host, file, argp);
block->b_deferred_req =
rqstp->rq_chandle.defer(block->b_cache_req);
if (block->b_deferred_req != NULL)
- status = nlm_drop_reply;
+ status = nlm__int__drop_reply;
}
dprintk("lockd: nlmsvc_defer_lock_rqst block %p flags %d status %d\n",
block, block->b_flags, ntohl(status));
ret = nlm_lck_denied;
goto out;
}
- ret = nlm_drop_reply;
+ ret = nlm__int__drop_reply;
goto out;
}
case nlm_lck_denied_nolocks:
case nlm_lck_blocked:
case nlm_lck_denied_grace_period:
- case nlm_drop_reply:
+ case nlm__int__drop_reply:
break;
case nlm4_deadlock:
status = nlm_lck_denied;
/* Obtain client and file */
if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now check for conflicting locks */
resp->status = cast_status(nlmsvc_testlock(rqstp, file, host,
&argp->lock, &resp->lock));
- if (resp->status == nlm_drop_reply)
+ if (resp->status == nlm__int__drop_reply)
rc = rpc_drop_reply;
else
dprintk("lockd: TEST status %d vers %d\n",
/* Obtain client and file */
if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to lock the file */
resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock,
argp->block, &argp->cookie,
argp->reclaim));
- if (resp->status == nlm_drop_reply)
+ if (resp->status == nlm__int__drop_reply)
rc = rpc_drop_reply;
else
dprintk("lockd: LOCK status %d\n", ntohl(resp->status));
/* Obtain client and file */
if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Try to cancel request. */
resp->status = cast_status(nlmsvc_cancel_blocked(net, file, &argp->lock));
/* Obtain client and file */
if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to remove the lock */
resp->status = cast_status(nlmsvc_unlock(net, file, &argp->lock));
/* Obtain client and file */
if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to create the share */
resp->status = cast_status(nlmsvc_share_file(host, file, argp));
/* Obtain client and file */
if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
- return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
+ return resp->status == nlm__int__drop_reply ?
+ rpc_drop_reply : rpc_success;
/* Now try to unshare the file */
resp->status = cast_status(nlmsvc_unshare_file(host, file, argp));
* to callback when the delegation is returned but might
* not have a proper lock request to block on.
*/
- return nlm_drop_reply;
+ return nlm__int__drop_reply;
case nfserr_stale:
return nlm_stale_fh;
default:
*/
#define LOCKD_DFLT_TIMEO 10
+/*
+ * Internal-use status codes, not to be placed on the wire.
+ * Version handlers translate these to appropriate wire values.
+ */
+#define nlm__int__drop_reply cpu_to_be32(30000)
+
/*
* Lockd host handle (used both by the client and server personality).
*/
#define nlm_lck_blocked cpu_to_be32(NLM_LCK_BLOCKED)
#define nlm_lck_denied_grace_period cpu_to_be32(NLM_LCK_DENIED_GRACE_PERIOD)
-#define nlm_drop_reply cpu_to_be32(30000)
-
/* Lock info passed via NLM */
struct nlm_lock {
char * caller;