[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230109051823.480289-9-willy@infradead.org>
Date: Mon, 9 Jan 2023 05:18:20 +0000
From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
To: unlisted-recipients:; (no To-header on input)
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Jeff Layton <jlayton@...hat.com>,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>
Subject: [PATCH 08/11] cifs: Remove call to filemap_check_wb_err()
filemap_write_and_wait() now calls filemap_check_wb_err(), so we cannot
glean any additional information by calling it ourselves. It may also
be misleading as it will pick up on any errors since the beginning of
time which may well be since before this program opened the file.
Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
---
fs/cifs/file.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 22dfc1f8b4f1..7e7ee26cf77d 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3042,14 +3042,12 @@ int cifs_flush(struct file *file, fl_owner_t id)
int rc = 0;
if (file->f_mode & FMODE_WRITE)
- rc = filemap_write_and_wait(inode->i_mapping);
+ rc = filemap_write_and_wait(file->f_mapping);
cifs_dbg(FYI, "Flush inode %p file %p rc %d\n", inode, file, rc);
- if (rc) {
- /* get more nuanced writeback errors */
- rc = filemap_check_wb_err(file->f_mapping, 0);
+ if (rc)
trace_cifs_flush_err(inode->i_ino, rc);
- }
+
return rc;
}
--
2.35.1
Powered by blists - more mailing lists