lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202201212250.cPTkICQp-lkp@intel.com>
Date:   Fri, 21 Jan 2022 22:26:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        GNU/Weeb Mailing List <gwml@...weeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:dhowells/linux-fs/netfs-lib 20/30]
 fs/netfs/read_helper.c:1256:7: error: implicit declaration of function
 'netfs_is_cache_enabled'

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-lib
head:   41c3c11032cdbee08d6be046b0caa2776b4fd437
commit: 5dcff5ed720e69e0ffec5ade8d8a0df96d0b0369 [20/30] netfs: Add a netfs inode context
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220121/202201212250.cPTkICQp-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7b3d30728816403d1fd73cc5082e9fb761262bce)
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://github.com/ammarfaizi2/linux-block/commit/5dcff5ed720e69e0ffec5ade8d8a0df96d0b0369
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-lib
        git checkout 5dcff5ed720e69e0ffec5ade8d8a0df96d0b0369
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   fs/netfs/read_helper.c:979:14: warning: variable 'folio' is uninitialized when used here [-Wuninitialized]
                           folio_put(folio);
                                     ^~~~~
   fs/netfs/read_helper.c:928:21: note: initialize the variable 'folio' to silence this warning
           struct folio *folio;
                              ^
                               = NULL
>> fs/netfs/read_helper.c:1256:7: error: implicit declaration of function 'netfs_is_cache_enabled' [-Werror,-Wimplicit-function-declaration]
           if (!netfs_is_cache_enabled(ctx) &&
                ^
   1 warning and 1 error generated.


vim +/netfs_is_cache_enabled +1256 fs/netfs/read_helper.c

  1183	
  1184	/**
  1185	 * netfs_write_begin - Helper to prepare for writing
  1186	 * @file: The file to read from
  1187	 * @mapping: The mapping to read from
  1188	 * @pos: File position at which the write will begin
  1189	 * @len: The length of the write (may extend beyond the end of the folio chosen)
  1190	 * @aop_flags: AOP_* flags
  1191	 * @_folio: Where to put the resultant folio
  1192	 * @_fsdata: Place for the netfs to store a cookie
  1193	 *
  1194	 * Pre-read data for a write-begin request by drawing data from the cache if
  1195	 * possible, or the netfs if not.  Space beyond the EOF is zero-filled.
  1196	 * Multiple I/O requests from different sources will get munged together.  If
  1197	 * necessary, the readahead window can be expanded in either direction to a
  1198	 * more convenient alighment for RPC efficiency or to make storage in the cache
  1199	 * feasible.
  1200	 *
  1201	 * The calling netfs must provide a table of operations, only one of which,
  1202	 * issue_op, is mandatory.
  1203	 *
  1204	 * The check_write_begin() operation can be provided to check for and flush
  1205	 * conflicting writes once the folio is grabbed and locked.  It is passed a
  1206	 * pointer to the fsdata cookie that gets returned to the VM to be passed to
  1207	 * write_end.  It is permitted to sleep.  It should return 0 if the request
  1208	 * should go ahead; unlock the folio and return -EAGAIN to cause the folio to
  1209	 * be regot; or return an error.
  1210	 *
  1211	 * The calling netfs must initialise a netfs context contiguous to the vfs
  1212	 * inode before calling this.
  1213	 *
  1214	 * This is usable whether or not caching is enabled.
  1215	 */
  1216	int netfs_write_begin(struct file *file, struct address_space *mapping,
  1217			      loff_t pos, unsigned int len, unsigned int aop_flags,
  1218			      struct folio **_folio, void **_fsdata)
  1219	{
  1220		struct netfs_read_request *rreq;
  1221		struct netfs_i_context *ctx = netfs_i_context(file_inode(file ));
  1222		struct folio *folio;
  1223		unsigned int debug_index = 0, fgp_flags;
  1224		pgoff_t index = pos >> PAGE_SHIFT;
  1225		int ret;
  1226	
  1227		DEFINE_READAHEAD(ractl, file, NULL, mapping, index);
  1228	
  1229	retry:
  1230		fgp_flags = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE;
  1231		if (aop_flags & AOP_FLAG_NOFS)
  1232			fgp_flags |= FGP_NOFS;
  1233		folio = __filemap_get_folio(mapping, index, fgp_flags,
  1234					    mapping_gfp_mask(mapping));
  1235		if (!folio)
  1236			return -ENOMEM;
  1237	
  1238		if (ctx->ops->check_write_begin) {
  1239			/* Allow the netfs (eg. ceph) to flush conflicts. */
  1240			ret = ctx->ops->check_write_begin(file, pos, len, folio, _fsdata);
  1241			if (ret < 0) {
  1242				trace_netfs_failure(NULL, NULL, ret, netfs_fail_check_write_begin);
  1243				if (ret == -EAGAIN)
  1244					goto retry;
  1245				goto error;
  1246			}
  1247		}
  1248	
  1249		if (folio_test_uptodate(folio))
  1250			goto have_folio;
  1251	
  1252		/* If the folio is beyond the EOF, we want to clear it - unless it's
  1253		 * within the cache granule containing the EOF, in which case we need
  1254		 * to preload the granule.
  1255		 */
> 1256		if (!netfs_is_cache_enabled(ctx) &&

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ