Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-coresight-backports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-coresight-backports
  • Repository
Switch branch/tag
  • linux-coresight-backports
  • fs
  • proc
  • base.c
Find file BlameHistoryPermalink
  • Alexey Dobriyan's avatar
    proc: skip branch in /proc/*/* lookup · 26b95137
    Alexey Dobriyan authored Jun 14, 2018
    Code is structured like this:
    
    	for ( ... p < last; p++) {
    		if (memcmp == 0)
    			break;
    	}
    	if (p >= last)
    		ERROR
    	OK
    
    gcc doesn't see that if if lookup succeeds than post loop branch will
    never be taken and skip it.
    
    [akpm@linux-foundation.org: proc_pident_instantiate() no longer takes an inode*]
    Link: http://lkml.kernel.org/r/20180423213954.GD9043@avx2
    
    
    Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
    Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    26b95137