lkml.org 
[lkml]   [2016]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] debugfs: Add .fsync() callback proxy support
Date
This patch adds .fsync() callback for debugfs files.
ACPI AML debugger needs to implement this to flush cmds/logs.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/debugfs/file.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 592059f..f863a0c 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -172,6 +172,10 @@ FULL_PROXY_FUNC(unlocked_ioctl, long, filp,
PROTO(struct file *filp, unsigned int cmd, unsigned long arg),
ARGS(filp, cmd, arg));

+FULL_PROXY_FUNC(fsync, int, filp,
+ PROTO(struct file *filp, loff_t start, loff_t end, int datasync),
+ ARGS(filp, start, end, datasync));
+
static unsigned int full_proxy_poll(struct file *filp,
struct poll_table_struct *wait)
{
@@ -226,6 +230,8 @@ static void __full_proxy_fops_init(struct file_operations *proxy_fops,
proxy_fops->poll = full_proxy_poll;
if (real_fops->unlocked_ioctl)
proxy_fops->unlocked_ioctl = full_proxy_unlocked_ioctl;
+ if (real_fops->fsync)
+ proxy_fops->fsync = full_proxy_fsync;
}

static int full_proxy_open(struct inode *inode, struct file *filp)
--
1.7.10
\
 
 \ /
  Last update: 2016-07-14 05:41    [W:3.504 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site