Skip to content

Commit

Permalink
smb: do not test the return value of folio_start_writeback()
Browse files Browse the repository at this point in the history
[ Upstream commit a9540e3 ]

In preparation for removing the return value entirely, stop testing it
in smb.

Link: https://lkml.kernel.org/r/20231108204605.745109-4-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Steve French <sfrench@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: f3dc1bdb6b0b ("cifs: Fix writeback data corruption")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Matthew Wilcox (Oracle) authored and Sasha Levin committed Mar 26, 2024
1 parent 57541d8 commit 2e411c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/smb/client/file.c
Expand Up @@ -2709,8 +2709,7 @@ static void cifs_extend_writeback(struct address_space *mapping,
*/
if (!folio_clear_dirty_for_io(folio))
WARN_ON(1);
if (folio_start_writeback(folio))
WARN_ON(1);
folio_start_writeback(folio);

*_count -= folio_nr_pages(folio);
folio_unlock(folio);
Expand Down Expand Up @@ -2745,8 +2744,7 @@ static ssize_t cifs_write_back_from_locked_folio(struct address_space *mapping,
int rc;

/* The folio should be locked, dirty and not undergoing writeback. */
if (folio_start_writeback(folio))
WARN_ON(1);
folio_start_writeback(folio);

count -= folio_nr_pages(folio);
len = folio_size(folio);
Expand Down

0 comments on commit 2e411c5

Please sign in to comment.