memcg: charge fs_context and legacy_fs_context
[linux-block.git] / fs / fs_context.c
index de1985eae535f651727ed674ba0f95751f32ccec..b7e43a780a625bca1b0faeba53e2702463ad0496 100644 (file)
@@ -254,7 +254,7 @@ static struct fs_context *alloc_fs_context(struct file_system_type *fs_type,
        struct fs_context *fc;
        int ret = -ENOMEM;
 
-       fc = kzalloc(sizeof(struct fs_context), GFP_KERNEL);
+       fc = kzalloc(sizeof(struct fs_context), GFP_KERNEL_ACCOUNT);
        if (!fc)
                return ERR_PTR(-ENOMEM);
 
@@ -649,7 +649,7 @@ const struct fs_context_operations legacy_fs_context_ops = {
  */
 static int legacy_init_fs_context(struct fs_context *fc)
 {
-       fc->fs_private = kzalloc(sizeof(struct legacy_fs_context), GFP_KERNEL);
+       fc->fs_private = kzalloc(sizeof(struct legacy_fs_context), GFP_KERNEL_ACCOUNT);
        if (!fc->fs_private)
                return -ENOMEM;
        fc->ops = &legacy_fs_context_ops;