From 31ddd3268dcb6c1d70e9930a83be43bf86e4bf17 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Thu, 17 Dec 2009 20:12:06 -0500 Subject: inotify: use container_of instead of casting inotify_free_mark casts directly from an fsnotify_mark_entry to an inotify_inode_mark_entry. This works, but should use container_of instead for future proofing. Signed-off-by: Eric Paris --- fs/notify/inotify/inotify_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/notify/inotify/inotify_user.c') diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index f22a040..a0e40f7 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -550,7 +550,9 @@ skip_send_ignore: /* 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); } -- cgit v1.1