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.zh...@intel.com>
Cc: Greg Kroah-Hartman <gre...@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

Reply via email to