aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/fsnotify_backend.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 44848aa830dc..6c3de999fb34 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -280,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
280 assert_spin_locked(&dentry->d_lock); 280 assert_spin_locked(&dentry->d_lock);
281 281
282 parent = dentry->d_parent; 282 parent = dentry->d_parent;
283 if (fsnotify_inode_watches_children(parent->d_inode)) 283 if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode))
284 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; 284 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED;
285 else 285 else
286 dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; 286 dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED;