All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android17-6.18 1/1] mm/shmem.c:2567:1: warning: unused label 'alloced'
Date: Fri, 23 Jan 2026 15:24:33 +0800	[thread overview]
Message-ID: <202601231517.dbbYNlCo-lkp@intel.com> (raw)

tree:   https://android.googlesource.com/kernel/common android17-6.18
head:   22d898bf7ba07008f717e5807c0a2e6b43c3c38b
commit: f7c3a55656ccd32a44f4bf8a142c84203095fad9 [1/1] ANDROID: mm: shmem: add vendor hooks in shmem folio allocation path
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20260123/202601231517.dbbYNlCo-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260123/202601231517.dbbYNlCo-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601231517.dbbYNlCo-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mm/shmem.c:2567:1: warning: unused label 'alloced' [-Wunused-label]
    2567 | alloced:
         | ^~~~~~~~
   1 warning generated.


vim +/alloced +2567 mm/shmem.c

c5bf121e4350a9 Vineeth Remanan Pillai  2019-03-05  2557  
e7a2ab7b3bb5d8 Baolin Wang             2024-06-11  2558  	folio = shmem_alloc_and_add_folio(vmf, gfp, inode, index, fault_mm, 0);
3022fd7af9604d Hugh Dickins            2023-09-29  2559  	if (IS_ERR(folio)) {
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2560) 		error = PTR_ERR(folio);
3022fd7af9604d Hugh Dickins            2023-09-29  2561  		if (error == -EEXIST)
3022fd7af9604d Hugh Dickins            2023-09-29  2562  			goto repeat;
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2563) 		folio = NULL;
c5bf121e4350a9 Vineeth Remanan Pillai  2019-03-05  2564  		goto unlock;
779750d20b93bb Kiryl Shutsemau         2016-07-26  2565  	}
54af60421822bb Hugh Dickins            2011-08-03  2566  
3022fd7af9604d Hugh Dickins            2023-09-29 @2567  alloced:
1635f6a74152f1 Hugh Dickins            2012-05-29  2568  	alloced = true;
e7a2ab7b3bb5d8 Baolin Wang             2024-06-11  2569  	if (folio_test_large(folio) &&
779750d20b93bb Kiryl Shutsemau         2016-07-26  2570  	    DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE) <
de5b85262e2038 Hugh Dickins            2024-08-25  2571  					folio_next_index(folio)) {
3022fd7af9604d Hugh Dickins            2023-09-29  2572  		struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);
3022fd7af9604d Hugh Dickins            2023-09-29  2573  		struct shmem_inode_info *info = SHMEM_I(inode);
779750d20b93bb Kiryl Shutsemau         2016-07-26  2574  		/*
fc26babbc7d45a Matthew Wilcox (Oracle  2022-09-02  2575) 		 * Part of the large folio is beyond i_size: subject
779750d20b93bb Kiryl Shutsemau         2016-07-26  2576  		 * to shrink under memory pressure.
779750d20b93bb Kiryl Shutsemau         2016-07-26  2577  		 */
779750d20b93bb Kiryl Shutsemau         2016-07-26  2578  		spin_lock(&sbinfo->shrinklist_lock);
d041353dc98a63 Cong Wang               2017-08-10  2579  		/*
d041353dc98a63 Cong Wang               2017-08-10  2580  		 * _careful to defend against unlocked access to
d041353dc98a63 Cong Wang               2017-08-10  2581  		 * ->shrink_list in shmem_unused_huge_shrink()
d041353dc98a63 Cong Wang               2017-08-10  2582  		 */
d041353dc98a63 Cong Wang               2017-08-10  2583  		if (list_empty_careful(&info->shrinklist)) {
779750d20b93bb Kiryl Shutsemau         2016-07-26  2584  			list_add_tail(&info->shrinklist,
779750d20b93bb Kiryl Shutsemau         2016-07-26  2585  				      &sbinfo->shrinklist);
779750d20b93bb Kiryl Shutsemau         2016-07-26  2586  			sbinfo->shrinklist_len++;
779750d20b93bb Kiryl Shutsemau         2016-07-26  2587  		}
779750d20b93bb Kiryl Shutsemau         2016-07-26  2588  		spin_unlock(&sbinfo->shrinklist_lock);
779750d20b93bb Kiryl Shutsemau         2016-07-26  2589  	}
779750d20b93bb Kiryl Shutsemau         2016-07-26  2590  
3022fd7af9604d Hugh Dickins            2023-09-29  2591  	if (sgp == SGP_WRITE)
3022fd7af9604d Hugh Dickins            2023-09-29  2592  		folio_set_referenced(folio);
ec9516fbc5fa81 Hugh Dickins            2012-05-29  2593  	/*
fc26babbc7d45a Matthew Wilcox (Oracle  2022-09-02  2594) 	 * Let SGP_FALLOC use the SGP_WRITE optimization on a new folio.
1635f6a74152f1 Hugh Dickins            2012-05-29  2595  	 */
1635f6a74152f1 Hugh Dickins            2012-05-29  2596  	if (sgp == SGP_FALLOC)
1635f6a74152f1 Hugh Dickins            2012-05-29  2597  		sgp = SGP_WRITE;
1635f6a74152f1 Hugh Dickins            2012-05-29  2598  clear:
1635f6a74152f1 Hugh Dickins            2012-05-29  2599  	/*
fc26babbc7d45a Matthew Wilcox (Oracle  2022-09-02  2600) 	 * Let SGP_WRITE caller clear ends if write does not fill folio;
fc26babbc7d45a Matthew Wilcox (Oracle  2022-09-02  2601) 	 * but SGP_FALLOC on a folio fallocated earlier must initialize
1635f6a74152f1 Hugh Dickins            2012-05-29  2602  	 * it now, lest undo on failure cancel our earlier guarantee.
ec9516fbc5fa81 Hugh Dickins            2012-05-29  2603  	 */
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2604) 	if (sgp != SGP_WRITE && !folio_test_uptodate(folio)) {
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2605) 		long i, n = folio_nr_pages(folio);
800d8c63b2e989 Kiryl Shutsemau         2016-07-26  2606  
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2607) 		for (i = 0; i < n; i++)
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2608) 			clear_highpage(folio_page(folio, i));
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2609) 		flush_dcache_folio(folio);
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2610) 		folio_mark_uptodate(folio);
ec9516fbc5fa81 Hugh Dickins            2012-05-29  2611  	}
bde05d1ccd5126 Hugh Dickins            2012-05-29  2612  
54af60421822bb Hugh Dickins            2011-08-03  2613  	/* Perhaps the file has been truncated since we checked */
75edd345e8ede5 Hugh Dickins            2016-05-19  2614  	if (sgp <= SGP_CACHE &&
09cbfeaf1a5a67 Kiryl Shutsemau         2016-04-01  2615  	    ((loff_t)index << PAGE_SHIFT) >= i_size_read(inode)) {
54af60421822bb Hugh Dickins            2011-08-03  2616  		error = -EINVAL;
267a4c76bbdb95 Hugh Dickins            2015-12-11  2617  		goto unlock;
e83c32e8f92724 Hugh Dickins            2011-07-25  2618  	}
63ec1973ddf3eb Matthew Wilcox (Oracle  2020-10-13  2619) out:
fc26babbc7d45a Matthew Wilcox (Oracle  2022-09-02  2620) 	*foliop = folio;
54af60421822bb Hugh Dickins            2011-08-03  2621  	return 0;
^1da177e4c3f41 Linus Torvalds          2005-04-16  2622  
59a16ead572330 Hugh Dickins            2011-05-11  2623  	/*
54af60421822bb Hugh Dickins            2011-08-03  2624  	 * Error recovery.
59a16ead572330 Hugh Dickins            2011-05-11  2625  	 */
d189922862e03c Hugh Dickins            2012-07-11  2626  unlock:
3022fd7af9604d Hugh Dickins            2023-09-29  2627  	if (alloced)
3022fd7af9604d Hugh Dickins            2023-09-29  2628  		filemap_remove_folio(folio);
3022fd7af9604d Hugh Dickins            2023-09-29  2629  	shmem_recalc_inode(inode, 0, 0);
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2630) 	if (folio) {
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2631) 		folio_unlock(folio);
b1d0ec3a9a250b Matthew Wilcox (Oracle  2022-05-12  2632) 		folio_put(folio);
54af60421822bb Hugh Dickins            2011-08-03  2633  	}
54af60421822bb Hugh Dickins            2011-08-03  2634  	return error;
^1da177e4c3f41 Linus Torvalds          2005-04-16  2635  }
^1da177e4c3f41 Linus Torvalds          2005-04-16  2636  

:::::: The code at line 2567 was first introduced by commit
:::::: 3022fd7af9604d44ec43da8a4398872989599b18 shmem: _add_to_page_cache() before shmem_inode_acct_blocks()

:::::: TO: Hugh Dickins <hughd@google.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-01-23  7:24 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 \
    --in-reply-to=202601231517.dbbYNlCo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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.