public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: David Howells <[email protected]>
Cc: [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected]
Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-linked-list 39/45] fs/netfs/buffered_write.c:670 netfs_page_mkwrite() warn: unsigned 'ret' is never less than zero.
Date: Thu, 28 Apr 2022 19:19:29 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-linked-list
head:   a20ca5707a9b524115f5ded439fed1f8e552dd6b
commit: 95f517db4cb2fbcfdabe76d0be06d75746958b0b [39/45] netfs: Allow buffered shared-writeable mmap through netfs_page_mkwrite()
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220428/[email protected]/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

smatch warnings:
fs/netfs/buffered_write.c:670 netfs_page_mkwrite() warn: unsigned 'ret' is never less than zero.

vim +/ret +670 fs/netfs/buffered_write.c

   640	
   641	/*
   642	 * Notification that a previously read-only page is about to become writable.
   643	 * Note that the caller indicates a single page of a multipage folio.
   644	 */
   645	vm_fault_t netfs_page_mkwrite(struct vm_fault *vmf)
   646	{
   647		struct netfs_dirty_region *region;
   648		struct folio *folio = page_folio(vmf->page);
   649		struct file *file = vmf->vma->vm_file;
   650		struct inode *inode = file_inode(file);
   651		struct netfs_i_context *ctx = netfs_i_context(inode);
   652		vm_fault_t ret = VM_FAULT_RETRY;
   653		int err;
   654		LIST_HEAD(spare_regions);
   655	
   656		_enter("%lx", folio->index);
   657	
   658		if (ctx->ops->validate_for_write(inode, file) < 0)
   659			return VM_FAULT_SIGBUS;
   660	
   661		sb_start_pagefault(inode->i_sb);
   662	
   663		if (folio_wait_writeback_killable(folio))
   664			goto out;
   665	
   666		if (folio_lock_killable(folio) < 0)
   667			goto out;
   668	
   669		ret = netfs_preallocate_regions(&spare_regions);
 > 670		if (ret < 0) {

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-04-28 11:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox