lkml.org 
[lkml]   [2014]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Overlayfs: ovl_fill_merge() should use container_of() rather than direct cast
From
On Thu, Oct 30, 2014 at 3:10 PM, David Howells <dhowells@redhat.com> wrote:
> ovl_fill_merge() effectively directly casts the buf pointer to an
> ovl_readdir_data struct pointer, but the pointer actually points to the
> dir_context struct contained therein.
>
> So use container_of() instead.
>
> Signed-off-by: David Howells <dhowells@redhat.com>

Okay, but why don't we have a typed argument of actor then?

Being typeless is encouraging exactly the kind of games overlayfs is
doing (probably copied mindlessly from some other part of the kernel).

Thanks,
Miklos


\
 
 \ /
  Last update: 2014-10-30 16:01    [W:0.363 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site