diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index f22a04005db21145add6647352ff6b3e3848078b..a0e40f7c9781ce61534d2e251a830f8d29f34045 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -550,7 +550,9 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark_entry *entry, /* ding dong the mark is dead */ static void inotify_free_mark(struct fsnotify_mark_entry *entry) { - struct inotify_inode_mark_entry *ientry = (struct inotify_inode_mark_entry *)entry; + struct inotify_inode_mark_entry *ientry; + + ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry); kmem_cache_free(inotify_inode_mark_cachep, ientry); }