diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 20:12:06 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:19 -0400 |
commit | 31ddd3268dcb6c1d70e9930a83be43bf86e4bf17 (patch) | |
tree | a9ee0ac61f73e7dd6883d4466a56b79fe3e6e38b /fs/notify/inotify/inotify_user.c | |
parent | b4277d3dd5a7400c1ea7fd4e7d64bda8899f84f5 (diff) |
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>
Diffstat (limited to 'fs/notify/inotify/inotify_user.c')
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index f22a04005db2..a0e40f7c9781 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -550,7 +550,9 @@ skip_send_ignore: | |||
550 | /* ding dong the mark is dead */ | 550 | /* ding dong the mark is dead */ |
551 | static void inotify_free_mark(struct fsnotify_mark_entry *entry) | 551 | static void inotify_free_mark(struct fsnotify_mark_entry *entry) |
552 | { | 552 | { |
553 | struct inotify_inode_mark_entry *ientry = (struct inotify_inode_mark_entry *)entry; | 553 | struct inotify_inode_mark_entry *ientry; |
554 | |||
555 | ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry); | ||
554 | 556 | ||
555 | kmem_cache_free(inotify_inode_mark_cachep, ientry); | 557 | kmem_cache_free(inotify_inode_mark_cachep, ientry); |
556 | } | 558 | } |