]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/sunrpc/xdr.h
Pull ec into release branch
[linux-2.6-omap-h63xx.git] / include / linux / sunrpc / xdr.h
index 9e340fa23c0633f55c6e152d049874c41282f78a..c6b53d181bfa9a4b23e091ed5fc0e36317d38629 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/uio.h>
 #include <asm/byteorder.h>
 #include <linux/scatterlist.h>
+#include <linux/smp_lock.h>
 
 /*
  * Buffer adjustment
@@ -35,6 +36,21 @@ struct xdr_netobj {
  */
 typedef int    (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj);
 
+/*
+ * We're still requiring the BKL in the xdr code until it's been
+ * more carefully audited, at which point this wrapper will become
+ * unnecessary.
+ */
+static inline int rpc_call_xdrproc(kxdrproc_t xdrproc, void *rqstp, __be32 *data, void *obj)
+{
+       int ret;
+
+       lock_kernel();
+       ret = xdrproc(rqstp, data, obj);
+       unlock_kernel();
+       return ret;
+}
+
 /*
  * Basic structure for transmission/reception of a client XDR message.
  * Features a header (for a linear buffer containing RPC headers