aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index bba56b39dcc5..ba5954f41e14 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -582,7 +582,7 @@ truncate_out:
582 zero_user(page, offset, PAGE_SIZE - offset); 582 zero_user(page, offset, PAGE_SIZE - offset);
583 583
584 /* An encrypted inode should have a key and truncate the last page. */ 584 /* An encrypted inode should have a key and truncate the last page. */
585 f2fs_bug_on(F2FS_I_SB(inode), cache_only && f2fs_encrypted_inode(inode)); 585 f2fs_bug_on(F2FS_I_SB(inode), cache_only && IS_ENCRYPTED(inode));
586 if (!cache_only) 586 if (!cache_only)
587 set_page_dirty(page); 587 set_page_dirty(page);
588 f2fs_put_page(page, 1); 588 f2fs_put_page(page, 1);
@@ -711,7 +711,7 @@ int f2fs_getattr(const struct path *path, struct kstat *stat,
711 stat->attributes |= STATX_ATTR_APPEND; 711 stat->attributes |= STATX_ATTR_APPEND;
712 if (flags & F2FS_COMPR_FL) 712 if (flags & F2FS_COMPR_FL)
713 stat->attributes |= STATX_ATTR_COMPRESSED; 713 stat->attributes |= STATX_ATTR_COMPRESSED;
714 if (f2fs_encrypted_inode(inode)) 714 if (IS_ENCRYPTED(inode))
715 stat->attributes |= STATX_ATTR_ENCRYPTED; 715 stat->attributes |= STATX_ATTR_ENCRYPTED;
716 if (flags & F2FS_IMMUTABLE_FL) 716 if (flags & F2FS_IMMUTABLE_FL)
717 stat->attributes |= STATX_ATTR_IMMUTABLE; 717 stat->attributes |= STATX_ATTR_IMMUTABLE;
@@ -1563,7 +1563,7 @@ static long f2fs_fallocate(struct file *file, int mode,
1563 if (!S_ISREG(inode->i_mode)) 1563 if (!S_ISREG(inode->i_mode))
1564 return -EINVAL; 1564 return -EINVAL;
1565 1565
1566 if (f2fs_encrypted_inode(inode) && 1566 if (IS_ENCRYPTED(inode) &&
1567 (mode & (FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_INSERT_RANGE))) 1567 (mode & (FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_INSERT_RANGE)))
1568 return -EOPNOTSUPP; 1568 return -EOPNOTSUPP;
1569 1569
@@ -1647,7 +1647,7 @@ static int f2fs_ioc_getflags(struct file *filp, unsigned long arg)
1647 struct f2fs_inode_info *fi = F2FS_I(inode); 1647 struct f2fs_inode_info *fi = F2FS_I(inode);
1648 unsigned int flags = fi->i_flags; 1648 unsigned int flags = fi->i_flags;
1649 1649
1650 if (f2fs_encrypted_inode(inode)) 1650 if (IS_ENCRYPTED(inode))
1651 flags |= F2FS_ENCRYPT_FL; 1651 flags |= F2FS_ENCRYPT_FL;
1652 if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode)) 1652 if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode))
1653 flags |= F2FS_INLINE_DATA_FL; 1653 flags |= F2FS_INLINE_DATA_FL;
@@ -2414,7 +2414,7 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in,
2414 if (!S_ISREG(src->i_mode) || !S_ISREG(dst->i_mode)) 2414 if (!S_ISREG(src->i_mode) || !S_ISREG(dst->i_mode))
2415 return -EINVAL; 2415 return -EINVAL;
2416 2416
2417 if (f2fs_encrypted_inode(src) || f2fs_encrypted_inode(dst)) 2417 if (IS_ENCRYPTED(src) || IS_ENCRYPTED(dst))
2418 return -EOPNOTSUPP; 2418 return -EOPNOTSUPP;
2419 2419
2420 if (src == dst) { 2420 if (src == dst) {