[PATCH] afs: fix no return statement in function returning non-void

David Howells dhowells at redhat.com
Wed Jun 16 06:41:35 PDT 2021


Tom Rix <trix at redhat.com> wrote:

> A fix is to use the __noreturn attribute on this function and not add a return
> like this
> 
> -static int afs_dir_set_page_dirty(struct page *page)
> +static int __noreturn afs_dir_set_page_dirty(struct page *page)
> 
> and to the set of ~300 similar functions in these files.

BUG() really ought to handle it.  Do you have CONFIG_BUG=y?

David




More information about the linux-afs mailing list