Whamcloud - gitweb
LU-6496 ptlrpc: Fix wrong code indentation in plain_authorize
[fs/lustre-release.git] / lustre / ptlrpc / sec.c
index 4effd99..ccb6d82 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_SEC
 
-#include <libcfs/libcfs.h>
+#include <linux/user_namespace.h>
+#ifdef HAVE_UIDGID_HEADER
+# include <linux/uidgid.h>
+#endif
 #include <linux/crypto.h>
 #include <linux/key.h>
 
+#include <libcfs/libcfs.h>
 #include <obd.h>
 #include <obd_class.h>
 #include <obd_support.h>
@@ -412,7 +416,7 @@ static int import_sec_validate_get(struct obd_import *imp,
 }
 
 /**
- * Given a \a req, find or allocate a appropriate context for it.
+ * Given a \a req, find or allocate an appropriate context for it.
  * \pre req->rq_cli_ctx == NULL.
  *
  * \retval 0 succeed, and req->rq_cli_ctx is set.
@@ -566,7 +570,7 @@ int sptlrpc_req_replace_dead_ctx(struct ptlrpc_request *req)
         newctx = req->rq_cli_ctx;
         LASSERT(newctx);
 
-        if (unlikely(newctx == oldctx && 
+       if (unlikely(newctx == oldctx &&
                     test_bit(PTLRPC_CTX_DEAD_BIT, &oldctx->cc_flags))) {
                 /*
                  * still get the old dead ctx, usually means system too busy
@@ -575,8 +579,8 @@ int sptlrpc_req_replace_dead_ctx(struct ptlrpc_request *req)
                        "ctx (%p, fl %lx) doesn't switch, relax a little bit\n",
                        newctx, newctx->cc_flags);
 
-               schedule_timeout_and_set_state(TASK_INTERRUPTIBLE,
-                       msecs_to_jiffies(MSEC_PER_SEC));
+               set_current_state(TASK_INTERRUPTIBLE);
+               schedule_timeout(msecs_to_jiffies(MSEC_PER_SEC));
        } else {
                 /*
                  * it's possible newctx == oldctx if we're switching
@@ -732,10 +736,10 @@ again:
          * it for reply reconstruction.
          *
          * Commonly the original context should be uptodate because we
-         * have a expiry nice time; server will keep its context because
+        * have an expiry nice time; server will keep its context because
          * we at least hold a ref of old context which prevent context
-         * destroying RPC being sent. So server still can accept the request
-         * and finish the RPC. But if that's not the case:
+        * from destroying RPC being sent. So server still can accept the
+        * request and finish the RPC. But if that's not the case:
          *  1. If server side context has been trimmed, a NO_CONTEXT will
          *     be returned, gss_cli_ctx_verify/unseal will switch to new
          *     context by force.
@@ -2046,7 +2050,7 @@ static int sptlrpc_svc_check_from(struct ptlrpc_request *req, int svc_rc)
 
 /**
  * Used by ptlrpc server, to perform transformation upon request message of
- * incoming \a req. This must be the first thing to do with a incoming
+ * incoming \a req. This must be the first thing to do with an incoming
  * request in ptlrpc layer.
  *
  * \retval SECSVC_OK success, and req->rq_reqmsg point to request message in