Explorar o código

android: binder: Use dedicated helper to access rlimit value

Use rlimit() helper instead of manually writing whole
chain from current task to rlim_cur

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Krzysztof Opasiak %!s(int64=8) %!d(string=hai) anos
pai
achega
c3643b699f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/android/binder.c

+ 1 - 1
drivers/android/binder.c

@@ -930,7 +930,7 @@ static void binder_set_nice(long nice)
 		set_user_nice(current, nice);
 		set_user_nice(current, nice);
 		return;
 		return;
 	}
 	}
-	min_nice = rlimit_to_nice(current->signal->rlim[RLIMIT_NICE].rlim_cur);
+	min_nice = rlimit_to_nice(rlimit(RLIMIT_NICE));
 	binder_debug(BINDER_DEBUG_PRIORITY_CAP,
 	binder_debug(BINDER_DEBUG_PRIORITY_CAP,
 		     "%d: nice value %ld not allowed use %ld instead\n",
 		     "%d: nice value %ld not allowed use %ld instead\n",
 		      current->pid, nice, min_nice);
 		      current->pid, nice, min_nice);