diff mbox series

[3/4] smb: Do not test the return value of folio_start_writeback()

Message ID 20231108204605.745109-4-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Make folio_start_writeback return void | expand

Commit Message

Matthew Wilcox Nov. 8, 2023, 8:46 p.m. UTC
In preparation for removing the return value entirely, stop testing it
in smb.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/smb/client/file.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Paulo Alcantara Nov. 9, 2023, 3:46 a.m. UTC | #1
"Matthew Wilcox (Oracle)" <willy@infradead.org> writes:

> In preparation for removing the return value entirely, stop testing it
> in smb.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
>  fs/smb/client/file.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Steve French Nov. 9, 2023, 4:33 a.m. UTC | #2
Acked-by: Steve French <stfrench@microsoft.com>

On Wed, Nov 8, 2023 at 9:46 PM Paulo Alcantara <pc@manguebit.com> wrote:
>
> "Matthew Wilcox (Oracle)" <willy@infradead.org> writes:
>
> > In preparation for removing the return value entirely, stop testing it
> > in smb.
> >
> > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> > ---
> >  fs/smb/client/file.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
>
> Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
>
diff mbox series

Patch

diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
index cf17e3dd703e..45ca492c141c 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -2706,8 +2706,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);
@@ -2742,8 +2741,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);