Re: [RFC PATCHv2 1/2] Add mm flag to control THP

From: Oleg Nesterov
Date: Fri Jan 17 2014 - 15:14:38 EST


On 01/16, Alex Thorlton wrote:
>
> + case PR_GET_THP_DISABLE:
> + error = put_user(test_bit(MMF_THP_DISABLE,
> + &me->mm->flags),
> + (int __user *) arg2);
> + break;

Do we really want put_user?

error = test_bit(MMF_THP_DISABLE);

can work too and looks simpler (and to me simpler to use in userspace).

PR_GET_DUMPABLE works this way.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/