Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1278686

Re: [PATCH 18/37] mm: factor out VMA fault permission checking

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 18/37] mm: factor out VMA fault permission checking
Date 2015-11-27 11:00 +0100
Message-ID <qznYS-18E-9@gated-at.bofh.it> (permalink)
References <qvFhE-7YL-5@gated-at.bofh.it> <qvFrj-82I-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 18/37] mm: factor out VMA fault permission checking Dave Hansen <dave@sr71.net> - 2015-11-17 04:50 +0100
  Re: [PATCH 18/37] mm: factor out VMA fault permission checking Thomas Gleixner <tglx@linutronix.de> - 2015-11-27 11:00 +0100

csiph-web