summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-09-05 16:54:24 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2017-09-05 20:11:29 -0700
commit1958593e4fa9fa9e3e2d03b27e72af314c2891be (patch)
treeac86368a7315dacf4fe1d4c5d4c811f40daa2f6a /fs/f2fs/gc.c
parent2afce76a1151fe2f1104962c327d8f85047045e6 (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/gc.c')
-rw-r--r--fs/f2fs/gc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index b226760afba8..6a12f33d0cdd 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -831,8 +831,7 @@ next_step:
continue;
/* if encrypted inode, let's go phase 3 */
- if (f2fs_encrypted_inode(inode) &&
- S_ISREG(inode->i_mode)) {
+ if (f2fs_encrypted_file(inode)) {
add_gc_inode(gc_list, inode);
continue;
}
@@ -873,7 +872,7 @@ next_step:
start_bidx = start_bidx_of_node(nofs, inode)
+ ofs_in_node;
- if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode))
+ if (f2fs_encrypted_file(inode))
move_encrypted_block(inode, start_bidx, segno, off);
else
move_data_page(inode, start_bidx, gc_type, segno, off);