Re: [PATCH 18/37] mm: factor out VMA fault permission checking
From: Thomas Gleixner
Date: Fri Nov 27 2015 - 04:54:23 EST
On Mon, 16 Nov 2015, Dave Hansen wrote:
> +bool vma_permits_fault(struct vm_area_struct *vma, unsigned int fault_flags)
> +{
> + vm_flags_t vm_flags =
> + (fault_flags & FAULT_FLAG_WRITE) ? VM_WRITE : VM_READ;
> +
vm_flags_t vm_flags;
vm_flags = (fault_flags & FAULT_FLAG_WRITE) ? VM_WRITE : VM_READ;
makes it readable w/o brain twisting.
Thanks,
tglx
--
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/