]> git.baikalelectronics.ru Git - kernel.git/commit
fs: allow d_instantiate to be called with negative parent dentry
authorJeremy Kerr <jk@ozlabs.org>
Mon, 29 Jun 2009 06:31:58 +0000 (14:31 +0800)
committerEric Paris <eparis@redhat.com>
Mon, 29 Jun 2009 14:00:58 +0000 (10:00 -0400)
commite374bd149da075684d798293be867c55a2e7767c
tree15daad02d6c41c7947cab0a8760dac1046c472ff
parenta3486f3f37e2b4819a026183d39e80253c3caafc
fs: allow d_instantiate to be called with negative parent dentry

The new fsnotify infrastructure (starting at 73a3fb07) 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: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
include/linux/fsnotify_backend.h