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 <eparis@redhat.com>
This commit is contained in:
Eric Paris 2009-12-17 20:12:06 -05:00
Родитель b4277d3dd5
Коммит 31ddd3268d
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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);
}