FS-Cache: make fscache_fsdef_netfs_def const
PATCH 1/1 FS-Cache: make fscache_fsdef_netfs_def const
Make fscache_fsdef_netfs_def const as it is only stored in a const field of a fscache_cookie structure. Make the declaration const too.
Structure found using Coccinelle and changes done by hand.
Signed-off-by Bhumika Goyal <[email protected]>
--- fs/fscache/fsdef.c | 2 +- fs/fscache/internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/fscache/fsdef.c +1 -1
@@ -68,7 +68,7 @@ struct fscache_cookie fscache_fsdef_index = {* a specific netfs and only applicable to a particular version of the index * structure used by that netfs. */ -struct fscache_cookie_def fscache_fsdef_netfs_def = { +const struct fscache_cookie_def fscache_fsdef_netfs_def = { .name ="FSDEF.netfs" , .type =FSCACHE_COOKIE_TYPE_INDEX , .get_key = fscache_fsdef_netfs_get_key,
fs/fscache/internal.h +1 -1
@@ -55,7 +55,7 @@ extern struct fscache_cache *fscache_select_cache_for_object(* fsdef.c */ extern struct fscache_cookie fscache_fsdef_index; -extern struct fscache_cookie_def fscache_fsdef_netfs_def; +extern const struct fscache_cookie_def fscache_fsdef_netfs_def;/* * histogram.c
Signature · 1 line
1.9.1