Skip to content

Commit

Permalink
fscrypt: remove ->is_encrypted()
Browse files Browse the repository at this point in the history
Now that all callers of fscrypt_operations.is_encrypted() have been
switched to IS_ENCRYPTED(), remove ->is_encrypted().

Reviewed-by: Chao Yu <[email protected]>
Acked-by: Dave Chinner <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
  • Loading branch information
ebiggers authored and tytso committed Oct 18, 2017
1 parent e0428a2 commit f7293e4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 14 deletions.
2 changes: 0 additions & 2 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1241,13 +1241,11 @@ static const struct fscrypt_operations ext4_cryptops = {
.get_context = ext4_get_context,
.set_context = ext4_set_context,
.dummy_context = ext4_dummy_context,
.is_encrypted = ext4_encrypted_inode,
.empty_dir = ext4_empty_dir,
.max_namelen = ext4_max_namelen,
};
#else
static const struct fscrypt_operations ext4_cryptops = {
.is_encrypted = ext4_encrypted_inode,
};
#endif

Expand Down
2 changes: 0 additions & 2 deletions fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,13 +1594,11 @@ static const struct fscrypt_operations f2fs_cryptops = {
.key_prefix = "f2fs:",
.get_context = f2fs_get_context,
.set_context = f2fs_set_context,
.is_encrypted = f2fs_encrypted_inode,
.empty_dir = f2fs_empty_dir,
.max_namelen = f2fs_max_namelen,
};
#else
static const struct fscrypt_operations f2fs_cryptops = {
.is_encrypted = f2fs_encrypted_inode,
};
#endif

Expand Down
1 change: 0 additions & 1 deletion fs/ubifs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ const struct fscrypt_operations ubifs_crypt_operations = {
.key_prefix = "ubifs:",
.get_context = ubifs_crypt_get_context,
.set_context = ubifs_crypt_set_context,
.is_encrypted = __ubifs_crypt_is_encrypted,
.empty_dir = ubifs_crypt_empty_dir,
.max_namelen = ubifs_crypt_max_namelen,
};
1 change: 0 additions & 1 deletion fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2009,7 +2009,6 @@ static struct ubifs_info *alloc_ubifs_info(struct ubi_volume_desc *ubi)

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

Expand Down
9 changes: 2 additions & 7 deletions fs/ubifs/ubifs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1834,18 +1834,13 @@ int ubifs_decrypt(const struct inode *inode, struct ubifs_data_node *dn,

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;
}

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

/* Normal UBIFS messages */
__printf(2, 3)
void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...);
Expand Down
1 change: 0 additions & 1 deletion include/linux/fscrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ struct fscrypt_operations {
int (*get_context)(struct inode *, void *, size_t);
int (*set_context)(struct inode *, const void *, size_t, void *);
bool (*dummy_context)(struct inode *);
bool (*is_encrypted)(struct inode *);
bool (*empty_dir)(struct inode *);
unsigned (*max_namelen)(struct inode *);
};
Expand Down

0 comments on commit f7293e4

Please sign in to comment.