Re: [PATCH 2/2] Simple shared page tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 15, 2006 at 05:56:18PM -0500, Dave McCracken wrote:

> The actual shared page table patches

Some stylistic nits I ran into while reading these:

> +#else /* CONFIG_PTSHARE */
> +#define pt_is_shared(page)	(0)
> +#define pt_is_shared_pte(pmdval)	(0)
> +#define pt_increment_share(page)
> +#define pt_decrement_share(page)
> +#define	pt_share_pte(vma, pmd, address)	pte_alloc_map(vma->vm_mm, pmd, address)
> +#define pt_unshare_range(mm, address, end)
> +#define pt_check_unshare_pte(mm, address, pmd)	(0)
> +#endif /* CONFIG_PTSHARE */

ISTR empty statements gave warnings with some compilers, perhaps use
do {} while (0) here?

> @@ -144,8 +147,9 @@ mprotect_fixup(struct vm_area_struct *vm
>  	if (newflags & VM_WRITE) {
>  		if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED))) {
>  			charged = nrpages;
> -			if (security_vm_enough_memory(charged))
> +			if (security_vm_enough_memory(charged)) {
>  				return -ENOMEM;
> +			}

Superflous {}

>  			newflags |= VM_ACCOUNT;
>  		}
>  	}
> @@ -182,7 +186,7 @@ success:
>  	if (vma->vm_ops && vma->vm_ops->page_mkwrite)
>  		mask &= ~VM_SHARED;
>  
> -	newprot = protection_map[newflags & mask];
> + 	newprot = protection_map[newflags & mask];

Whitespace damaged

Cheers,
Muli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux