[Ocfs2-devel] [-mm PATCH] ocfs2: Shared writeable mmap

David Howells dhowells at redhat.com
Tue Jun 20 08:02:25 CDT 2006


David Howells <dhowells at redhat.com> wrote:

> Peter Zijlstra <a.p.zijlstra at chello.nl> wrote:
> 
> > -	if (unlikely(vma->vm_flags & VM_SHARED)) {
> > +	if (unlikely(vma->vm_flags & (VM_SHARED|VM_WRITE) ==
> > +				VM_SHARED|VM_WRITE) {
> 
> NAK!
> 
> "==" is higher priority than "|".  What you meant was:
> 
> -	if (unlikely(vma->vm_flags & VM_SHARED)) {
> +	if (unlikely(vma->vm_flags & (VM_SHARED|VM_WRITE) ==
> +				(VM_SHARED|VM_WRITE)) {

Or, rather:

-	if (unlikely(vma->vm_flags & VM_SHARED)) {
+	if (unlikely(vma->vm_flags & (VM_SHARED|VM_WRITE) ==
+				(VM_SHARED|VM_WRITE))) {

It has insufficient closing brackets otherwise.

David



More information about the Ocfs2-devel mailing list