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

Re: Proposed aufs3 vs. arm64 fix



On Fri, 2014-07-18 at 22:35 +0100, Ian Campbell wrote:
[...]
> -static inline void vmr_do_fput(struct vm_region *region,
> -			       const char func[], int line)
> -{
> -	struct file *f = region->vm_file, *pr = region->vm_prfile;
> -	aufs_trace(f, pr, func, line, __func__);
> -	fput(f);
> -	if (f && pr)
> -		fput(pr);
> -}
> +#define vmr_pr_or_file(region)		vmr_do_pr_or_file(region, __func__, \
> +							  __LINE__)
>  
> -static inline void vma_do_file_update_time(struct vm_area_struct *vma,
> -					   const char func[], int line)
> -{
> -	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
> -	aufs_trace(f, pr, func, line, __func__);
> -	file_update_time(f);
> -	if (f && pr)
> -		file_update_time(pr);
> -}
> +#define vmr_fput(_region) do {						\
> +	struct vm_region *region = _region;				\

Parentheses around _region.

> +	struct file *f = region->vm_file, *pr = region->vm_prfile;	\
> +	aufs_trace(f, pr, __func__, __LINE__, vmr_fput);		\

Last argument needs to be quoted (but this is #ifndef CONFIG_MMU... who
cares).

> +	fput(f);							\
> +	if (f && pr)							\
> +		fput(pr);						\
> +} while(0);
> +
> +#endif
> +
> +#define vma_file_update_time(_vma) {				\
> +	struct vm_area_struct *vma = _vma;			\
[...]

Same for _vma (and in the other macros below).

Ben.

-- 
Ben Hutchings
Kids!  Bringing about Armageddon can be dangerous.  Do not attempt it in
your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: