[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 7 Jul 2017 15:16:48 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Gioh Kim <gi-oh.kim@...fitbricks.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
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.
Powered by blists - more mailing lists