lkml.org 
[lkml]   [2014]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5] mm, shmem: Add shmem_vma() helper
On 07/22, Jerome Marchand wrote:
>
> +bool shmem_vma(struct vm_area_struct *vma)
> +{
> + return (vma->vm_file &&
> + vma->vm_file->f_dentry->d_inode->i_mapping->backing_dev_info
> + == &shmem_backing_dev_info);
> +
> +}

Cosmetic nit, it seems that this helper could simply do

return vma->vm_file && shmem_mapping(file_inode(vma->vm_file));

Oleg.



\
 
 \ /
  Last update: 2014-07-24 22:41    [W:0.090 / U:0.596 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site