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

Commit 82cbed4c authored by Eric Biggers's avatar Eric Biggers Committed by Jaegeuk Kim
Browse files

fscrypt: remove ->is_encrypted()



Now that all callers of fscrypt_operations.is_encrypted() have been
switched to IS_ENCRYPTED(), remove ->is_encrypted().

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 2edb5df1
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -1241,13 +1241,11 @@ static const struct fscrypt_operations ext4_cryptops = {
	.get_context		= ext4_get_context,
	.get_context		= ext4_get_context,
	.set_context		= ext4_set_context,
	.set_context		= ext4_set_context,
	.dummy_context		= ext4_dummy_context,
	.dummy_context		= ext4_dummy_context,
	.is_encrypted		= ext4_encrypted_inode,
	.empty_dir		= ext4_empty_dir,
	.empty_dir		= ext4_empty_dir,
	.max_namelen		= ext4_max_namelen,
	.max_namelen		= ext4_max_namelen,
};
};
#else
#else
static const struct fscrypt_operations ext4_cryptops = {
static const struct fscrypt_operations ext4_cryptops = {
	.is_encrypted		= ext4_encrypted_inode,
};
};
#endif
#endif


+0 −2
Original line number Original line Diff line number Diff line
@@ -1738,13 +1738,11 @@ static const struct fscrypt_operations f2fs_cryptops = {
	.key_prefix	= "f2fs:",
	.key_prefix	= "f2fs:",
	.get_context	= f2fs_get_context,
	.get_context	= f2fs_get_context,
	.set_context	= f2fs_set_context,
	.set_context	= f2fs_set_context,
	.is_encrypted	= f2fs_encrypted_inode,
	.empty_dir	= f2fs_empty_dir,
	.empty_dir	= f2fs_empty_dir,
	.max_namelen	= f2fs_max_namelen,
	.max_namelen	= f2fs_max_namelen,
};
};
#else
#else
static const struct fscrypt_operations f2fs_cryptops = {
static const struct fscrypt_operations f2fs_cryptops = {
	.is_encrypted	= f2fs_encrypted_inode,
};
};
#endif
#endif


+0 −1
Original line number Original line Diff line number Diff line
@@ -88,7 +88,6 @@ const struct fscrypt_operations ubifs_crypt_operations = {
	.key_prefix		= "ubifs:",
	.key_prefix		= "ubifs:",
	.get_context		= ubifs_crypt_get_context,
	.get_context		= ubifs_crypt_get_context,
	.set_context		= ubifs_crypt_set_context,
	.set_context		= ubifs_crypt_set_context,
	.is_encrypted		= __ubifs_crypt_is_encrypted,
	.empty_dir		= ubifs_crypt_empty_dir,
	.empty_dir		= ubifs_crypt_empty_dir,
	.max_namelen		= ubifs_crypt_max_namelen,
	.max_namelen		= ubifs_crypt_max_namelen,
};
};
+0 −1
Original line number Original line Diff line number Diff line
@@ -2009,7 +2009,6 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi)


#ifndef CONFIG_UBIFS_FS_ENCRYPTION
#ifndef CONFIG_UBIFS_FS_ENCRYPTION
const struct fscrypt_operations ubifs_crypt_operations = {
const struct fscrypt_operations ubifs_crypt_operations = {
	.is_encrypted		= __ubifs_crypt_is_encrypted,
};
};
#endif
#endif


+2 −7
Original line number Original line Diff line number Diff line
@@ -1834,18 +1834,13 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,


extern const struct fscrypt_operations ubifs_crypt_operations;
extern const struct fscrypt_operations ubifs_crypt_operations;


static inline bool __ubifs_crypt_is_encrypted(struct inode *inode)
static inline bool ubifs_crypt_is_encrypted(const struct inode *inode)
{
{
	struct ubifs_inode *ui = ubifs_inode(inode);
	const struct ubifs_inode *ui = ubifs_inode(inode);


	return ui->flags & UBIFS_CRYPT_FL;
	return ui->flags & UBIFS_CRYPT_FL;
}
}


static inline bool ubifs_crypt_is_encrypted(const struct inode *inode)
{
	return __ubifs_crypt_is_encrypted((struct inode *)inode);
}

/* Normal UBIFS messages */
/* Normal UBIFS messages */
__printf(2, 3)
__printf(2, 3)
void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...);
void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...);
Loading