Commit e6ce3066 authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Eric Paris

fs: allow d_instantiate to be called with negative parent dentry

The new fsnotify infrastructure (starting at 90586523) causes an oops in
spufs, where we populate a directory with files before instantiating the
directory itself. The new changes seem to have introduced an assumption
that a dentry's parent will be positive when instantiating.

This change makes it once again possible to d_instantiate a dentry
with a negative parent, and brings __fsnotify_d_instantiate() into
line with inotify_d_instantiate(), which already has this NULL check.
Signed-off-by: default avatarJeremy Kerr <>
Signed-off-by: default avatarEric Paris <>
parent 52989765
......@@ -280,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
parent = dentry->d_parent;
if (fsnotify_inode_watches_children(parent->d_inode))
if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment