Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fa20786 authored by Eric Biggers's avatar Eric Biggers Committed by Jaegeuk Kim
Browse files

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: default avatarChao Yu <yuchao0@huawei.com>
Acked-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 7319c5ee
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1791,9 +1791,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,
@@ -2524,7 +2521,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;