diff options
author | David Sterba <dsterba@suse.com> | 2015-11-19 11:42:31 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-07 15:01:15 +0100 |
commit | 4d4ab6d6bc05ba65169de9a5391e6ccbe09d8719 (patch) | |
tree | b4402e0388ee13df3bbd6d7f78108436e0dbea6b /fs/btrfs/inode.c | |
parent | 20e5506baf3fd651e245bc970d8c11a734ee1b8a (diff) | |
download | lwn-4d4ab6d6bc05ba65169de9a5391e6ccbe09d8719.tar.gz lwn-4d4ab6d6bc05ba65169de9a5391e6ccbe09d8719.zip |
btrfs: constify static arrays
There are a few statically initialized arrays that can be made const.
The remaining (like file_system_type, sysfs attributes or prop handlers)
do not allow that due to type mismatch when passed to the APIs or
because the structures are modified through other members.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c4cfba79ab47..3e1398b123aa 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -83,7 +83,7 @@ struct kmem_cache *btrfs_path_cachep; struct kmem_cache *btrfs_free_space_cachep; #define S_SHIFT 12 -static unsigned char btrfs_type_by_mode[S_IFMT >> S_SHIFT] = { +static const unsigned char btrfs_type_by_mode[S_IFMT >> S_SHIFT] = { [S_IFREG >> S_SHIFT] = BTRFS_FT_REG_FILE, [S_IFDIR >> S_SHIFT] = BTRFS_FT_DIR, [S_IFCHR >> S_SHIFT] = BTRFS_FT_CHRDEV, |