]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/f2fs/super.c
Merge tag 'for-linus-20190420' of git://git.kernel.dk/linux-block
[linux.git] / fs / f2fs / super.c
index 324938ec95f3e21186c41d1a1e7871f41617bf87..f2aaa2cc6b3e01e88a7aeea026cfaa97f73ae1de 100644 (file)
@@ -757,7 +757,7 @@ static int parse_options(struct super_block *sb, char *options)
                        kvfree(name);
                        break;
                case Opt_test_dummy_encryption:
-#ifdef CONFIG_F2FS_FS_ENCRYPTION
+#ifdef CONFIG_FS_ENCRYPTION
                        if (!f2fs_sb_has_encrypt(sbi)) {
                                f2fs_msg(sb, KERN_ERR, "Encrypt feature is off");
                                return -EINVAL;
@@ -838,10 +838,7 @@ static int parse_options(struct super_block *sb, char *options)
                }
 
                min_size = sizeof(struct f2fs_xattr_header) / sizeof(__le32);
-               max_size = DEF_ADDRS_PER_INODE -
-                       F2FS_TOTAL_EXTRA_ATTR_SIZE / sizeof(__le32) -
-                       DEF_INLINE_RESERVED_SIZE -
-                       MIN_INLINE_DENTRY_SIZE / sizeof(__le32);
+               max_size = MAX_INLINE_XATTR_SIZE;
 
                if (F2FS_OPTION(sbi).inline_xattr_size < min_size ||
                                F2FS_OPTION(sbi).inline_xattr_size > max_size) {
@@ -1403,7 +1400,7 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
                seq_printf(seq, ",whint_mode=%s", "user-based");
        else if (F2FS_OPTION(sbi).whint_mode == WHINT_MODE_FS)
                seq_printf(seq, ",whint_mode=%s", "fs-based");
-#ifdef CONFIG_F2FS_FS_ENCRYPTION
+#ifdef CONFIG_FS_ENCRYPTION
        if (F2FS_OPTION(sbi).test_dummy_encryption)
                seq_puts(seq, ",test_dummy_encryption");
 #endif
@@ -2188,7 +2185,7 @@ static const struct super_operations f2fs_sops = {
        .remount_fs     = f2fs_remount,
 };
 
-#ifdef CONFIG_F2FS_FS_ENCRYPTION
+#ifdef CONFIG_FS_ENCRYPTION
 static int f2fs_get_context(struct inode *inode, void *ctx, size_t len)
 {
        return f2fs_getxattr(inode, F2FS_XATTR_INDEX_ENCRYPTION,
@@ -3152,7 +3149,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 #endif
 
        sb->s_op = &f2fs_sops;
-#ifdef CONFIG_F2FS_FS_ENCRYPTION
+#ifdef CONFIG_FS_ENCRYPTION
        sb->s_cop = &f2fs_cryptops;
 #endif
        sb->s_xattr = f2fs_xattr_handlers;