ocfs2: Use zero-sized array and struct_size() in kzalloc()
[linux-2.6-block.git] / fs / notify / fsnotify.h
index 7902653dd5771da03e48fb3014ff5fab84d2fd84..5a00121fb2197881c418c6bd7c8ebbec5eb44911 100644 (file)
@@ -21,6 +21,12 @@ static inline struct mount *fsnotify_conn_mount(
        return container_of(conn->obj, struct mount, mnt_fsnotify_marks);
 }
 
+static inline struct super_block *fsnotify_conn_sb(
+                               struct fsnotify_mark_connector *conn)
+{
+       return container_of(conn->obj, struct super_block, s_fsnotify_marks);
+}
+
 /* destroy all events sitting in this groups notification queue */
 extern void fsnotify_flush_notify(struct fsnotify_group *group);
 
@@ -43,6 +49,11 @@ static inline void fsnotify_clear_marks_by_mount(struct vfsmount *mnt)
 {
        fsnotify_destroy_marks(&real_mount(mnt)->mnt_fsnotify_marks);
 }
+/* run the list of all marks associated with sb and destroy them */
+static inline void fsnotify_clear_marks_by_sb(struct super_block *sb)
+{
+       fsnotify_destroy_marks(&sb->s_fsnotify_marks);
+}
 /* Wait until all marks queued for destruction are destroyed */
 extern void fsnotify_wait_marks_destroyed(void);