Преглед изворни кода

Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify

* 'for-linus' of git://git.infradead.org/users/eparis/notify:
  fs: allow d_instantiate to be called with negative parent dentry
Linus Torvalds пре 16 година
родитељ
комит
aa221cb617
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      include/linux/fsnotify_backend.h

+ 1 - 1
include/linux/fsnotify_backend.h

@@ -280,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
 	assert_spin_locked(&dentry->d_lock);
 
 	parent = dentry->d_parent;
-	if (fsnotify_inode_watches_children(parent->d_inode))
+	if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode))
 		dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED;
 	else
 		dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED;