aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/ubifs/file.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-12-09 13:27:21 -0800
committerEric Biggers <ebiggers@google.com>2020-01-20 10:43:46 -0800
commit50d9fad73a45a78f8b974b46307712556c9a42d3 (patch)
tree9145deb03cd0664bc8156daaf56dce847de87d88 /fs/ubifs/file.c
parentfscrypt: document gfp_flags for bounce page allocation (diff)
downloadwireguard-linux-50d9fad73a45a78f8b974b46307712556c9a42d3.tar.xz
wireguard-linux-50d9fad73a45a78f8b974b46307712556c9a42d3.zip
ubifs: use IS_ENCRYPTED() instead of ubifs_crypt_is_encrypted()
There's no need for the ubifs_crypt_is_encrypted() function anymore. Just use IS_ENCRYPTED() instead, like ext4 and f2fs do. IS_ENCRYPTED() checks the VFS-level flag instead of the UBIFS-specific flag, but it shouldn't change any behavior since the flags are kept in sync. Link: https://lore.kernel.org/r/20191209212721.244396-1-ebiggers@kernel.org Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r--fs/ubifs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index cd52585c8f4f..c8e8f50c6054 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -67,7 +67,7 @@ static int read_block(struct inode *inode, void *addr, unsigned int block,
dlen = le32_to_cpu(dn->ch.len) - UBIFS_DATA_NODE_SZ;
- if (ubifs_crypt_is_encrypted(inode)) {
+ if (IS_ENCRYPTED(inode)) {
err = ubifs_decrypt(inode, dn, &dlen, block);
if (err)
goto dump;
@@ -647,7 +647,7 @@ static int populate_page(struct ubifs_info *c, struct page *page,
dlen = le32_to_cpu(dn->ch.len) - UBIFS_DATA_NODE_SZ;
out_len = UBIFS_BLOCK_SIZE;
- if (ubifs_crypt_is_encrypted(inode)) {
+ if (IS_ENCRYPTED(inode)) {
err = ubifs_decrypt(inode, dn, &dlen, page_block);
if (err)
goto out_err;