diff options
author | Eric Biggers <ebiggers@google.com> | 2017-10-09 21:15:38 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-10-19 01:52:37 +0200 |
commit | ffcc41829ae043d0830bcd4536812fec7e098d93 (patch) | |
tree | dec5c48fa7632fe85d8b639644723d242b07e71a /fs/f2fs | |
parent | fscrypt: remove ->is_encrypted() (diff) | |
download | linux-ffcc41829ae043d0830bcd4536812fec7e098d93.tar.xz linux-ffcc41829ae043d0830bcd4536812fec7e098d93.zip |
fscrypt: remove unneeded empty fscrypt_operations structs
In the case where a filesystem has been configured without encryption
support, there is no longer any need to initialize ->s_cop at all, since
none of the methods are ever called.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 1cb41f711ab8..c1c7183b3527 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1597,9 +1597,6 @@ static const struct fscrypt_operations f2fs_cryptops = { .empty_dir = f2fs_empty_dir, .max_namelen = f2fs_max_namelen, }; -#else -static const struct fscrypt_operations f2fs_cryptops = { -}; #endif static struct inode *f2fs_nfs_get_inode(struct super_block *sb, @@ -2318,7 +2315,9 @@ try_onemore: #endif sb->s_op = &f2fs_sops; +#ifdef CONFIG_F2FS_FS_ENCRYPTION sb->s_cop = &f2fs_cryptops; +#endif sb->s_xattr = f2fs_xattr_handlers; sb->s_export_op = &f2fs_export_ops; sb->s_magic = F2FS_SUPER_MAGIC; |