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
  • ipc
  • mqueue.c
Find file BlameHistoryPermalink
  • Dave Hansen's avatar
    [PATCH] r/o bind mounts: elevate write count for open()s · 4a3fd211
    Dave Hansen authored Feb 15, 2008
    
    
    This is the first really tricky patch in the series.  It elevates the writer
    count on a mount each time a non-special file is opened for write.
    
    We used to do this in may_open(), but Miklos pointed out that __dentry_open()
    is used as well to create filps.  This will cover even those cases, while a
    call in may_open() would not have.
    
    There is also an elevated count around the vfs_create() call in open_namei().
    See the comments for more details, but we need this to fix a 'create, remount,
    fail r/w open()' race.
    
    Some filesystems forego the use of normal vfs calls to create
    struct files.   Make sure that these users elevate the mnt
    writer count because they will get __fput(), and we need
    to make sure they're balanced.
    
    Acked-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    4a3fd211
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7