Merge tag 'acpi-5.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-block.git] / fs / f2fs / file.c
index bba56b39dcc55a1b15da3a90ddb3c53cb894e7f2..ba5954f41e1406caa3194ec09a1a6cc133a001f2 100644 (file)
@@ -582,7 +582,7 @@ truncate_out:
        zero_user(page, offset, PAGE_SIZE - offset);
 
        /* An encrypted inode should have a key and truncate the last page. */
-       f2fs_bug_on(F2FS_I_SB(inode), cache_only && f2fs_encrypted_inode(inode));
+       f2fs_bug_on(F2FS_I_SB(inode), cache_only && IS_ENCRYPTED(inode));
        if (!cache_only)
                set_page_dirty(page);
        f2fs_put_page(page, 1);
@@ -711,7 +711,7 @@ int f2fs_getattr(const struct path *path, struct kstat *stat,
                stat->attributes |= STATX_ATTR_APPEND;
        if (flags & F2FS_COMPR_FL)
                stat->attributes |= STATX_ATTR_COMPRESSED;
-       if (f2fs_encrypted_inode(inode))
+       if (IS_ENCRYPTED(inode))
                stat->attributes |= STATX_ATTR_ENCRYPTED;
        if (flags & F2FS_IMMUTABLE_FL)
                stat->attributes |= STATX_ATTR_IMMUTABLE;
@@ -1563,7 +1563,7 @@ static long f2fs_fallocate(struct file *file, int mode,
        if (!S_ISREG(inode->i_mode))
                return -EINVAL;
 
-       if (f2fs_encrypted_inode(inode) &&
+       if (IS_ENCRYPTED(inode) &&
                (mode & (FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_INSERT_RANGE)))
                return -EOPNOTSUPP;
 
@@ -1647,7 +1647,7 @@ static int f2fs_ioc_getflags(struct file *filp, unsigned long arg)
        struct f2fs_inode_info *fi = F2FS_I(inode);
        unsigned int flags = fi->i_flags;
 
-       if (f2fs_encrypted_inode(inode))
+       if (IS_ENCRYPTED(inode))
                flags |= F2FS_ENCRYPT_FL;
        if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode))
                flags |= F2FS_INLINE_DATA_FL;
@@ -2414,7 +2414,7 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in,
        if (!S_ISREG(src->i_mode) || !S_ISREG(dst->i_mode))
                return -EINVAL;
 
-       if (f2fs_encrypted_inode(src) || f2fs_encrypted_inode(dst))
+       if (IS_ENCRYPTED(src) || IS_ENCRYPTED(dst))
                return -EOPNOTSUPP;
 
        if (src == dst) {