summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/lib/src/rpcsvc.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-08-31 06:50:34 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-31 07:44:55 -0700
commit66beeeb7739531335ad0982b51886e82f7c8647f (patch)
tree72a9509091722cbe25e2c05a92749c1611f4565d /xlators/nfs/lib/src/rpcsvc.c
parent2dd921a2848365f5fd538dd891b36a9f355ca78c (diff)
nfsrpc: Introduce THIS-setting support to fix mem-accounting
Not setting THIS in nfs/rpc has been a blocker for NFS on mainline because without THIS set correctly to nfsx, mem-accounting goes looking into translators other than nfsx for nfs memory allocations, resulting in dereferencing bad addresses. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1280 (gf_mem_set_acct_info goes into spinlock busyloop, never returns) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1280
Diffstat (limited to 'xlators/nfs/lib/src/rpcsvc.c')
-rw-r--r--xlators/nfs/lib/src/rpcsvc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc.c b/xlators/nfs/lib/src/rpcsvc.c
index 930634d6553..4698e2e8d11 100644
--- a/xlators/nfs/lib/src/rpcsvc.c
+++ b/xlators/nfs/lib/src/rpcsvc.c
@@ -1897,6 +1897,7 @@ nfs_rpcsvc_handle_rpc_call (rpcsvc_conn_t *conn)
goto err_reply;
if ((actor) && (actor->actor)) {
+ THIS = nfs_rpcsvc_request_actorxl (req);
nfs_rpcsvc_conn_ref (conn);
ret = actor->actor (req);
}
@@ -2201,6 +2202,7 @@ nfs_rpcsvc_record_vectored_call_actor (rpcsvc_conn_t *conn)
if (actor->vector_actor) {
nfs_rpcsvc_conn_ref (conn);
+ THIS = nfs_rpcsvc_request_actorxl (req);
ret = actor->vector_actor (req, rs->vectoriob);
} else {
nfs_rpcsvc_request_seterr (req, PROC_UNAVAIL);