From: Loic Dachary Date: Tue, 7 Oct 2014 12:02:09 +0000 (+0200) Subject: common: do not set ioprio if pid is not set X-Git-Tag: v0.87~32^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62f0ef406a7535dcf3aae942bbc3d5c1341ef4f1;p=ceph.git common: do not set ioprio if pid is not set Signed-off-by: Loic Dachary (cherry picked from commit c7e4c0bfe70bf29d3b8fe4df4e4b934853e33d26) --- diff --git a/src/common/Thread.cc b/src/common/Thread.cc index 7be0013a6676b..a962e06f66a4d 100644 --- a/src/common/Thread.cc +++ b/src/common/Thread.cc @@ -51,7 +51,8 @@ void *Thread::entry_wrapper() int p = ceph_gettid(); // may return -ENOSYS on other platforms if (p > 0) pid = p; - if (ioprio_class >= 0 && + if (pid && + ioprio_class >= 0 && ioprio_priority >= 0) { ceph_ioprio_set(IOPRIO_WHO_PROCESS, pid,