Commit 2ad0ef84 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Jaegeuk Kim

f2fs: super: constify fscrypt_operations structure

Declare fscrypt_operations structure as const as it is only stored in
the s_cop field of a super_block structure. This field is of type const,
so fscrypt_operations structure having this property can be made const
too.

File size before: fs/f2fs/super.o
   text	   data	    bss	    dec	    hex	filename
  54131	  31355	    184	  85670	  14ea6	fs/f2fs/super.o

File size after: fs/f2fs/super.o
   text	   data	    bss	    dec	    hex	filename
  54227	  31259	    184	  85670	  14ea6	fs/f2fs/super.o
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 1200abb2
......@@ -1209,7 +1209,7 @@ static unsigned f2fs_max_namelen(struct inode *inode)
inode->i_sb->s_blocksize : F2FS_NAME_LEN;
}
static struct fscrypt_operations f2fs_cryptops = {
static const struct fscrypt_operations f2fs_cryptops = {
.get_context = f2fs_get_context,
.key_prefix = f2fs_key_prefix,
.set_context = f2fs_set_context,
......@@ -1218,7 +1218,7 @@ static struct fscrypt_operations f2fs_cryptops = {
.max_namelen = f2fs_max_namelen,
};
#else
static struct fscrypt_operations f2fs_cryptops = {
static const struct fscrypt_operations f2fs_cryptops = {
.is_encrypted = f2fs_encrypted_inode,
};
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment