Re: [PATCH 2/8] NFS: prepare for RCU-walk support but pushing tests later in code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 05, 2014 at 04:59:33PM +1100, NeilBrown wrote:
> > 	b) having already become negative.
> 
> I didn't think dentries ever became negative.  When a file is deleted the old
> positive dentry is unlinked and a new negative dentry is created in it's
> place.
> Or has that changed since last I looked?

It has never been true.  See what d_delete() is doing.  If there was only
one reference to dentry, it *does* become negative.

> If they can become negative, then I could
>    dir = ACCESS_ONCE(parent->d_inode);
>    if (!dir)
>         return -ECHILD;
> 
> Do you think that would be safe?

Depends on what you do with it afterwards...
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux