* [mcgrof:20230307-larger-bs-then-ps-xfs 7/11] fs/iomap/buffered-io.c:1424:22: warning: variable 'status' set but not used
@ 2023-03-08 9:10 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-08 9:10 UTC (permalink / raw)
To: Dave Chinner; +Cc: oe-kbuild-all, Luis Chamberlain
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git 20230307-larger-bs-then-ps-xfs
head: e42ac7981c9cbcd80d1ffa2ad03c96574a320a62
commit: 89e0dbe34eb365d865a0b459668e5abe17cf95c8 [7/11] iomap: zero-around in iomap_page_mkwrite
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230308/202303081740.RJYdJ9MG-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?id=89e0dbe34eb365d865a0b459668e5abe17cf95c8
git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
git fetch --no-tags mcgrof 20230307-larger-bs-then-ps-xfs
git checkout 89e0dbe34eb365d865a0b459668e5abe17cf95c8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash fs/iomap/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303081740.RJYdJ9MG-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/iomap/buffered-io.c: In function 'iomap_folio_mkwrite_iter':
>> fs/iomap/buffered-io.c:1424:22: warning: variable 'status' set but not used [-Wunused-but-set-variable]
1424 | long status;
| ^~~~~~
vim +/status +1424 fs/iomap/buffered-io.c
1411
1412 static loff_t iomap_folio_mkwrite_iter(struct iomap_iter *iter,
1413 struct folio *folio, const struct iomap_ops *ops)
1414 {
1415 loff_t length = iomap_length(iter);
1416 loff_t ret;
1417
1418 /*
1419 * if we need to zero-around, we have to unlock the page we were given.
1420 * No big deal, we just have to repeat the "is this page ours" checks
1421 * after relocking it
1422 */
1423 if (iomap_need_zero_around(iter)) {
> 1424 long status;
1425 loff_t size;
1426
1427 /*
1428 * This only happens for block size > page size, so the file
1429 * offset of a page fault should always be page aligned.
1430 */
1431 WARN_ON(offset_in_folio(folio, iter->pos));
1432
1433 folio_unlock(folio);
1434 status = iomap_zero_around(iter, iter->pos, length, ops);
1435 folio_lock(folio);
1436 size = i_size_read(iter->inode);
1437 if ((folio->mapping != iter->inode->i_mapping) ||
1438 (folio_pos(folio) > size)) {
1439 /* We overload EFAULT to mean page got truncated */
1440 return -EFAULT;
1441 }
1442
1443 if (folio_pos(folio) != iter->pos) {
1444 /* it moved in the file! */
1445 return -EFAULT;
1446 }
1447
1448 /* return failure now if zeroing had an error */
1449 if (ret)
1450 return ret;
1451
1452 /* trim down the length is we straddle EOF. */
1453 if (((folio->index + 1) << PAGE_SHIFT) > size)
1454 length = offset_in_folio(folio, size);
1455
1456 }
1457
1458 if (iter->iomap.flags & IOMAP_F_BUFFER_HEAD) {
1459 ret = __block_write_begin_int(folio, iter->pos, length, NULL,
1460 &iter->iomap);
1461 if (ret)
1462 return ret;
1463 block_commit_write(&folio->page, 0, length);
1464 } else {
1465 WARN_ON_ONCE(!folio_test_uptodate(folio));
1466 folio_mark_dirty(folio);
1467 }
1468
1469 return length;
1470 }
1471
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-08 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08 9:10 [mcgrof:20230307-larger-bs-then-ps-xfs 7/11] fs/iomap/buffered-io.c:1424:22: warning: variable 'status' set but not used kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.