lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 30 Sep 2017 22:01:44 +0530
From:   Bhumika Goyal <bhumirks@...il.com>
To:     julia.lawall@...6.fr, dhowells@...hat.com,
        linux-cachefs@...hat.com, linux-kernel@...r.kernel.org
Cc:     Bhumika Goyal <bhumirks@...il.com>
Subject: [PATCH] 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 <bhumirks@...il.com>
---
 fs/fscache/fsdef.c    | 2 +-
 fs/fscache/internal.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fscache/fsdef.c b/fs/fscache/fsdef.c
index 5a117df..7c86f37 100644
--- a/fs/fscache/fsdef.c
+++ b/fs/fscache/fsdef.c
@@ -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,
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
index 97ec451..d485473 100644
--- a/fs/fscache/internal.h
+++ b/fs/fscache/internal.h
@@ -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
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ