[bug report] afs: Set up the iov_iter before calling afs_extract_data()

Dan Carpenter dan.carpenter at oracle.com
Thu Jan 28 05:09:56 EST 2021


Hello David Howells,

The patch 18da75126f90: "afs: Set up the iov_iter before calling
afs_extract_data()" from Feb 6, 2020, leads to the following static
checker warning:

	fs/afs/dir.c:250 afs_dir_check()
	warn: 'afs_dir_check_page(dvnode, page, req->file_size)' is unsigned

fs/afs/dir.c
   241          rcu_read_lock();
   242          xas_for_each(&xas, page, last) {
   243                  if (xas_retry(&xas, page))
   244                          continue;
   245  
   246                  BUG_ON(PageCompound(page));
   247                  BUG_ON(page->mapping != mapping);
   248  
   249                  ret = afs_dir_check_page(dvnode, page, req->file_size);
   250                  if (ret < 0) {

afs_dir_check_page() returns true/false instead of error codes.

   251                          afs_dir_dump(dvnode, req);
   252                          break;
   253                  }
   254          }
   255  
   256          rcu_read_unlock();
   257          return ret;
   258  }

regards,
dan carpenter



More information about the linux-afs mailing list