aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/notify/mark.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 05506d60131c..59cdb27826de 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -132,13 +132,13 @@ static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn)
132 struct fsnotify_mark *mark; 132 struct fsnotify_mark *mark;
133 133
134 assert_spin_locked(&conn->lock); 134 assert_spin_locked(&conn->lock);
135 /* We can get detached connector here when inode is getting unlinked. */
136 if (!fsnotify_valid_obj_type(conn->type))
137 return;
135 hlist_for_each_entry(mark, &conn->list, obj_list) { 138 hlist_for_each_entry(mark, &conn->list, obj_list) {
136 if (mark->flags & FSNOTIFY_MARK_FLAG_ATTACHED) 139 if (mark->flags & FSNOTIFY_MARK_FLAG_ATTACHED)
137 new_mask |= mark->mask; 140 new_mask |= mark->mask;
138 } 141 }
139 if (WARN_ON(!fsnotify_valid_obj_type(conn->type)))
140 return;
141
142 *fsnotify_conn_mask_p(conn) = new_mask; 142 *fsnotify_conn_mask_p(conn) = new_mask;
143} 143}
144 144