From ebfdb7e508289ebf3a92b21247ca8b5b5a557d8c Mon Sep 17 00:00:00 2001 From: qianjiaxing Date: Wed, 2 Mar 2022 06:32:26 +0000 Subject: [PATCH] hmdfs: support sendfile ohos inclusion category: feature issue: #I4VY3C CVE: NA ---------------------------------------------- hmdfs manage permission by configfs, bundle access its bundle directory but other directory. Signed-off-by: qianjiaxing --- fs/hmdfs/file_local.c | 2 ++ fs/hmdfs/file_merge.c | 2 ++ fs/hmdfs/file_remote.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/fs/hmdfs/file_local.c b/fs/hmdfs/file_local.c index 86d402515589..2b9c64a82bfa 100644 --- a/fs/hmdfs/file_local.c +++ b/fs/hmdfs/file_local.c @@ -205,6 +205,8 @@ const struct file_operations hmdfs_file_fops_local = { .open = hmdfs_file_open_local, .release = hmdfs_file_release_local, .fsync = hmdfs_fsync_local, + .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, }; static int hmdfs_iterate_local(struct file *file, struct dir_context *ctx) diff --git a/fs/hmdfs/file_merge.c b/fs/hmdfs/file_merge.c index 8c76b7e3098f..ea974d77c843 100644 --- a/fs/hmdfs/file_merge.c +++ b/fs/hmdfs/file_merge.c @@ -578,4 +578,6 @@ const struct file_operations hmdfs_file_fops_merge = { .flush = hmdfs_file_flush_merge, .release = hmdfs_file_release_local, .fsync = hmdfs_fsync_local, + .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, }; diff --git a/fs/hmdfs/file_remote.c b/fs/hmdfs/file_remote.c index 4ae87a138999..e1a450ef2145 100644 --- a/fs/hmdfs/file_remote.c +++ b/fs/hmdfs/file_remote.c @@ -624,6 +624,8 @@ const struct file_operations hmdfs_dev_file_fops_remote = { .release = hmdfs_file_release_remote, .flush = hmdfs_file_flush, .fsync = hmdfs_file_fsync_remote, + .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, }; static void hmdfs_fill_page_zero(struct page *page) -- Gitee