Hi David,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/perf/core]
[cannot apply to nfs/linux-next ceph-client/for-linus cifs/for-next linus/master v5.8-rc5
next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/David-Howells/fscache-Rewrite-1-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
c085fb8774671e83f6199a8e838fbc0e57094029
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/fscache/cookie.c: In function '__fscache_invalidate':
> fs/fscache/cookie.c:630:25: warning: variable 'object'
set but not used [-Wunused-but-set-variable]
630 | struct fscache_object
*object;
| ^~~~~~
vim +/object +630 fs/fscache/cookie.c
ccc4fc3d11e914 David Howells 2009-04-03 624
ef778e7ae67cd4 David Howells 2012-12-20 625 /*
ef778e7ae67cd4 David Howells 2012-12-20 626 * Invalidate an object. Callable with
spinlocks held.
ef778e7ae67cd4 David Howells 2012-12-20 627 */
ef778e7ae67cd4 David Howells 2012-12-20 628 void __fscache_invalidate(struct
fscache_cookie *cookie)
ef778e7ae67cd4 David Howells 2012-12-20 629 {
ef778e7ae67cd4 David Howells 2012-12-20 @630 struct fscache_object *object;
ef778e7ae67cd4 David Howells 2012-12-20 631
89f7b04612450d David Howells 2020-07-13 632 _enter("{%s}",
cookie->type_name);
ef778e7ae67cd4 David Howells 2012-12-20 633
ef778e7ae67cd4 David Howells 2012-12-20 634 fscache_stat(&fscache_n_invalidates);
ef778e7ae67cd4 David Howells 2012-12-20 635
ef778e7ae67cd4 David Howells 2012-12-20 636 /* Only permit invalidation of data files.
Invalidating an index will
ef778e7ae67cd4 David Howells 2012-12-20 637 * require the caller to release all its
attachments to the tree rooted
ef778e7ae67cd4 David Howells 2012-12-20 638 * there, and if it's doing that, it
may as well just retire the
ef778e7ae67cd4 David Howells 2012-12-20 639 * cookie.
ef778e7ae67cd4 David Howells 2012-12-20 640 */
402cb8dda949d9 David Howells 2018-04-04 641 ASSERTCMP(cookie->type, ==,
FSCACHE_COOKIE_TYPE_DATAFILE);
ef778e7ae67cd4 David Howells 2012-12-20 642
ef778e7ae67cd4 David Howells 2012-12-20 643 /* If there's an object, we tell the
object state machine to handle the
ef778e7ae67cd4 David Howells 2012-12-20 644 * invalidation on our behalf, otherwise
there's nothing to do.
ef778e7ae67cd4 David Howells 2012-12-20 645 */
ef778e7ae67cd4 David Howells 2012-12-20 646 if
(!hlist_empty(&cookie->backing_objects)) {
ef778e7ae67cd4 David Howells 2012-12-20 647 spin_lock(&cookie->lock);
ef778e7ae67cd4 David Howells 2012-12-20 648
94d30ae90a00ca David Howells 2013-09-21 649 if (fscache_cookie_enabled(cookie)
&&
94d30ae90a00ca David Howells 2013-09-21 650
!hlist_empty(&cookie->backing_objects) &&
ef778e7ae67cd4 David Howells 2012-12-20 651
!test_and_set_bit(FSCACHE_COOKIE_INVALIDATING,
ef778e7ae67cd4 David Howells 2012-12-20 652 &cookie->flags)) {
ef778e7ae67cd4 David Howells 2012-12-20 653 object =
hlist_entry(cookie->backing_objects.first,
ef778e7ae67cd4 David Howells 2012-12-20 654 struct fscache_object,
ef778e7ae67cd4 David Howells 2012-12-20 655 cookie_link);
584b5230d66e2c David Howells 2020-07-13 656 /* TODO: Do invalidation */
ef778e7ae67cd4 David Howells 2012-12-20 657 }
ef778e7ae67cd4 David Howells 2012-12-20 658
ef778e7ae67cd4 David Howells 2012-12-20 659 spin_unlock(&cookie->lock);
ef778e7ae67cd4 David Howells 2012-12-20 660 }
ef778e7ae67cd4 David Howells 2012-12-20 661
ef778e7ae67cd4 David Howells 2012-12-20 662 _leave("");
ef778e7ae67cd4 David Howells 2012-12-20 663 }
ef778e7ae67cd4 David Howells 2012-12-20 664 EXPORT_SYMBOL(__fscache_invalidate);
ef778e7ae67cd4 David Howells 2012-12-20 665
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org