Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • linux
  • file.h
Find file BlameHistoryPermalink
  • Sargun Dhillon's avatar
    vfs, fdtable: Add fget_task helper · 5e876fb4
    Sargun Dhillon authored Jan 07, 2020
    This introduces a function which can be used to fetch a file, given an
    arbitrary task. As long as the user holds a reference (refcnt) to the
    task_struct it is safe to call, and will either return NULL on failure,
    or a pointer to the file, with a refcnt.
    
    This patch is based on Oleg Nesterov's (cf. [1]) patch from September
    2018.
    
    [1]: Link: https://lore.kernel.org/r/20180915160423.GA31461@redhat.com
    
    
    
    Signed-off-by: default avatarSargun Dhillon <sargun@sargun.me>
    Suggested-by: default avatarOleg Nesterov <oleg@redhat.com>
    Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
    Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
    Link: https://lore.kernel.org/r/20200107175927.4558-2-sargun@sargun.me
    
    
    Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
    5e876fb4
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7