[lkml]   [2017]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] guarantee inode of alias's parent
On Fri, Jul 07, 2017 at 03:28:11PM +0200, Gioh Kim wrote:

> Before __d_unalias(), the dentry and parent of the dentry
> are locked. But I wonder how I can assure of existence of the
> alias and the parent of the alias.
> Where is the code to lock alias and alias->d_parent?

Nowhere. Why the hell would you want to lock them?

> What will happend if alias->d_parent be deleted by another process?

Huh? As soon as you've grabbed ->s_vfs_rename_mutex, ->d_parent of everything on
that filesystem is stable - and positive. Moreover, any positive dentry with
references held (in particular, anyone's parent) is going to remain such for
as long as those references are held.

 \ /
  Last update: 2017-07-07 16:17    [W:0.028 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site