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