Skip to content
Snippets Groups Projects
  • Al Viro's avatar
    25b229df
    fsnotify(): switch to passing const struct qstr * for file_name · 25b229df
    Al Viro authored
    
    Note that in fnsotify_move() and fsnotify_link() we are guaranteed
    that dentry->d_name won't change during the fsnotify() evaluation
    (by having the parent directory locked exclusive), so we don't
    need to fetch dentry->d_name.name in the callers.  In fsnotify_dirent()
    the same stability of dentry->d_name is also true, but it's a bit
    more convoluted - there is one callchain (devpts_pty_new() ->
    fsnotify_create() -> fsnotify_dirent()) where the parent is _not_
    locked, but on devpts ->d_name of everything is unchanging; it
    has neither explicit nor implicit renames.
    
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    25b229df
    History
    fsnotify(): switch to passing const struct qstr * for file_name
    Al Viro authored
    
    Note that in fnsotify_move() and fsnotify_link() we are guaranteed
    that dentry->d_name won't change during the fsnotify() evaluation
    (by having the parent directory locked exclusive), so we don't
    need to fetch dentry->d_name.name in the callers.  In fsnotify_dirent()
    the same stability of dentry->d_name is also true, but it's a bit
    more convoluted - there is one callchain (devpts_pty_new() ->
    fsnotify_create() -> fsnotify_dirent()) where the parent is _not_
    locked, but on devpts ->d_name of everything is unchanging; it
    has neither explicit nor implicit renames.
    
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.