git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux
[pandora-kernel.git]
/
fs
/
lockd
/
svc4proc.c
diff --git
a/fs/lockd/svc4proc.c
b/fs/lockd/svc4proc.c
index
47a66aa
..
3994446
100644
(file)
--- a/
fs/lockd/svc4proc.c
+++ b/
fs/lockd/svc4proc.c
@@
-58,8
+58,7
@@
nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return 0;
no_locks:
return 0;
no_locks:
- if (host)
- nlm_release_host(host);
+ nlm_release_host(host);
if (error)
return error;
return nlm_lck_denied_nolocks;
if (error)
return error;
return nlm_lck_denied_nolocks;
@@
-84,6
+83,7
@@
nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
{
struct nlm_host *host;
struct nlm_file *file;
{
struct nlm_host *host;
struct nlm_file *file;
+ int rc = rpc_success;
dprintk("lockd: TEST4 called\n");
resp->cookie = argp->cookie;
dprintk("lockd: TEST4 called\n");
resp->cookie = argp->cookie;
@@
-91,7
+91,7
@@
nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
/* Don't accept test requests during grace period */
if (nlmsvc_grace_period) {
resp->status = nlm_lck_denied_grace_period;
/* Don't accept test requests during grace period */
if (nlmsvc_grace_period) {
resp->status = nlm_lck_denied_grace_period;
- return r
pc_success
;
+ return r
c
;
}
/* Obtain client and file */
}
/* Obtain client and file */
@@
-99,12
+99,15
@@
nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
/* Now check for conflicting locks */
return resp->status == nlm_drop_reply ? rpc_drop_reply :rpc_success;
/* Now check for conflicting locks */
- resp->status = nlmsvc_testlock(file, &argp->lock, &resp->lock);
+ resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie);
+ if (resp->status == nlm_drop_reply)
+ rc = rpc_drop_reply;
+ else
+ dprintk("lockd: TEST4 status %d\n", ntohl(resp->status));
- dprintk("lockd: TEST4 status %d\n", ntohl(resp->status));
nlm_release_host(host);
nlm_release_file(file);
nlm_release_host(host);
nlm_release_file(file);
- return r
pc_success
;
+ return r
c
;
}
static __be32
}
static __be32
@@
-113,6
+116,7
@@
nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
{
struct nlm_host *host;
struct nlm_file *file;
{
struct nlm_host *host;
struct nlm_file *file;
+ int rc = rpc_success;
dprintk("lockd: LOCK called\n");
dprintk("lockd: LOCK called\n");
@@
-121,7
+125,7
@@
nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
/* Don't accept new lock requests during grace period */
if (nlmsvc_grace_period && !argp->reclaim) {
resp->status = nlm_lck_denied_grace_period;
/* Don't accept new lock requests during grace period */
if (nlmsvc_grace_period && !argp->reclaim) {
resp->status = nlm_lck_denied_grace_period;
- return r
pc_success
;
+ return r
c
;
}
/* Obtain client and file */
}
/* Obtain client and file */
@@
-141,13
+145,16
@@
nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
#endif
/* Now try to lock the file */
#endif
/* Now try to lock the file */
- resp->status = nlmsvc_lock(rqstp, file, &argp->lock,
+ resp->status = nlmsvc_lock(rqstp, file,
host,
&argp->lock,
argp->block, &argp->cookie);
argp->block, &argp->cookie);
+ if (resp->status == nlm_drop_reply)
+ rc = rpc_drop_reply;
+ else
+ dprintk("lockd: LOCK status %d\n", ntohl(resp->status));
- dprintk("lockd: LOCK status %d\n", ntohl(resp->status));
nlm_release_host(host);
nlm_release_file(file);
nlm_release_host(host);
nlm_release_file(file);
- return r
pc_success
;
+ return r
c
;
}
static __be32
}
static __be32
@@
-240,7
+247,9
@@
static void nlm4svc_callback_exit(struct rpc_task *task, void *data)
static void nlm4svc_callback_release(void *data)
{
static void nlm4svc_callback_release(void *data)
{
+ lock_kernel();
nlm_release_call(data);
nlm_release_call(data);
+ unlock_kernel();
}
static const struct rpc_call_ops nlm4svc_callback_ops = {
}
static const struct rpc_call_ops nlm4svc_callback_ops = {