提交 cdfb5c11 编写于 作者: Y Yu Kuai 提交者: Yongqiang Liu

block: fix kabi broken in ioctl.c

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6MRB5
CVE: NA

--------------------------------

Include blk.h in ioctl.c will cause kabi broken, because some data
structure definitions is exposed. This patch add a separate header file
to fix this problem.
Signed-off-by: NYu Kuai <yukuai3@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 efc73feb
...@@ -214,7 +214,6 @@ unsigned int blk_plug_queued_count(struct request_queue *q); ...@@ -214,7 +214,6 @@ unsigned int blk_plug_queued_count(struct request_queue *q);
void blk_account_io_start(struct request *req, bool new_io); void blk_account_io_start(struct request *req, bool new_io);
void blk_account_io_completion(struct request *req, unsigned int bytes); void blk_account_io_completion(struct request *req, unsigned int bytes);
void blk_account_io_done(struct request *req, u64 now); void blk_account_io_done(struct request *req, u64 now);
int disk_scan_partitions(struct gendisk *disk, fmode_t mode);
/* /*
* EH timer and IO completion will both attempt to 'grab' the request, make * EH timer and IO completion will both attempt to 'grab' the request, make
......
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023. Huawei Technologies Co., Ltd. All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef BLK_EXTRA_API_H
#define BLK_EXTRA_API_H
/*
* Include blk.h will cause kabi broken in some contexts because it will expose
* definitions for some data structure. This file is used for the apis that
* can't be placed in blk.h.
*/
#include <linux/genhd.h>
int disk_scan_partitions(struct gendisk *disk, fmode_t mode);
#endif /* BLK_EXTRA_API_H */
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <linux/pr.h> #include <linux/pr.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include "blk.h" #include "blk_extra_api.h"
static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user *arg) static int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg __user *arg)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册