Re: [PATCH 3/5] mm, shmem: Add shmem_vma() helper

From: Oleg Nesterov
Date: Thu Jul 24 2014 - 15:54:49 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/