aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2017-09-05 16:54:24 -0700
committerGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2017-09-05 20:11:29 -0700
commit1958593e4fa9fa9e3e2d03b27e72af314c2891be (patch)
treeac86368a7315dacf4fe1d4c5d4c811f40daa2f6a /fs/f2fs/f2fs.h
parentRevert "f2fs: add a new function get_ssr_cost" (diff)
downloadlinux-1958593e4fa9fa9e3e2d03b27e72af314c2891be.tar.gz
linux-1958593e4fa9fa9e3e2d03b27e72af314c2891be.tar.bz2
linux-1958593e4fa9fa9e3e2d03b27e72af314c2891be.zip
f2fs: introduce f2fs_encrypted_file for clean-up
This patch replaces (f2fs_encrypted_inode() && S_ISREG()) with f2fs_encrypted_file(), which gives no functional change. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 4b993961d81d..417c28f01fd5 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2939,6 +2939,11 @@ static inline bool f2fs_encrypted_inode(struct inode *inode)
return file_is_encrypt(inode);
}
+static inline bool f2fs_encrypted_file(struct inode *inode)
+{
+ return f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode);
+}
+
static inline void f2fs_set_encrypted_inode(struct inode *inode)
{
#ifdef CONFIG_F2FS_FS_ENCRYPTION