]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: remove useless check
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 14 Dec 2011 02:08:43 +0000 (18:08 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Wed, 14 Dec 2011 02:08:43 +0000 (18:08 -0800)
Session was already verified to exist before this.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/mon/OSDMonitor.cc

index 5a7ec946d2dc2cb3a253ecbdc9db94e28367afb2..87e3f195453e7a329f1ab69b70849820d7ffa01c 100644 (file)
@@ -2160,10 +2160,9 @@ bool OSDMonitor::preprocess_pool_op_create(MPoolOp *m)
   }
   if ((m->auid && !session->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_W, m->auid)) &&
       !session->caps.check_privileges(PAXOS_OSDMAP, MON_CAP_W)) {
-    if (session)
-      dout(5) << "attempt to create new pool without sufficient auid privileges!"
-             << "message: " << *m  << std::endl
-             << "caps: " << m->get_session()->caps << dendl;
+    dout(5) << "attempt to create new pool without sufficient auid privileges!"
+           << "message: " << *m  << std::endl
+           << "caps: " << session->caps << dendl;
     _pool_op_reply(m, -EPERM, osdmap.get_epoch());
     return true;
   }