From: Steve French <stfrench@microsoft.com>
Date: Thu, 6 Feb 2020 16:04:59 -0600
Subject: [PATCH] smb3: add one more dynamic tracepoint missing from strict
fsync path
Git-commit: 2391ca41b476078da5cf72c2fe82ae9f03da8b38
References: bsc#1144333
Patch-mainline: v5.6-rc1
We didn't have a dynamic trace point for catching errors in
file_write_and_wait_range error cases in cifs_strict_fsync.
Since not all apps check for write behind errors, it can be
important for debugging to be able to trace these error
paths.
Suggested-and-reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Paulo Alcantara <palcantara@suse.de>
---
fs/cifs/file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2610,8 +2610,10 @@ int cifs_strict_fsync(struct file *file,
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
rc = filemap_write_and_wait_range(inode->i_mapping, start, end);
- if (rc)
+ if (rc) {
+ trace_cifs_fsync_err(inode->i_ino, rc);
return rc;
+ }
inode_lock(inode);
xid = get_xid();