]> err.no Git - linux-2.6/blobdiff - fs/inotify.c
[PATCH] vmsplice: allow user to pass in gift pages
[linux-2.6] / fs / inotify.c
index 367c487c014b6f62db3c04811ad56e3bec4cc0df..1f50302849c53ce8c674fd71416777713de9009b 100644 (file)
@@ -538,7 +538,7 @@ void inotify_d_instantiate(struct dentry *entry, struct inode *inode)
        WARN_ON(entry->d_flags & DCACHE_INOTIFY_PARENT_WATCHED);
        spin_lock(&entry->d_lock);
        parent = entry->d_parent;
-       if (inotify_inode_watched(parent->d_inode))
+       if (parent->d_inode && inotify_inode_watched(parent->d_inode))
                entry->d_flags |= DCACHE_INOTIFY_PARENT_WATCHED;
        spin_unlock(&entry->d_lock);
 }