Messages in this thread | | | Date | Fri, 7 Jul 2017 15:16:48 +0100 | From | Al Viro <> | Subject | Re: [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.
| |