lkml.org 
[lkml]   [2016]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/shmem.c: constify anon_ops
On Thu, 15 Sep 2016, Rasmus Villemoes wrote:

> Every other dentry_operations instance is const, and this one might as
> well be.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Indeed, thanks,

Acked-by: Hugh Dickins <hughd@google.com>

> ---
> mm/shmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index fd8b2b5741b1..693ffdc5899a 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -4077,7 +4077,7 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
>
> /* common code */
>
> -static struct dentry_operations anon_ops = {
> +static const struct dentry_operations anon_ops = {
> .d_dname = simple_dname
> };
>
> --
> 2.1.4

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.289 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site