From: Miklos Szeredi <miklos@szeredi.hu>
To: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
linux-unionfs@vger.kernel.org,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Overlayfs: ovl_fill_merge() should use container_of() rather than direct cast
Date: Thu, 30 Oct 2014 15:36:02 +0100 [thread overview]
Message-ID: <CAJfpegv5dqfgze-9pxDD-O19tctS-4P12NsO2oCo5SF1bqhhHA@mail.gmail.com> (raw)
In-Reply-To: <20141030141004.28203.79687.stgit@warthog.procyon.org.uk>
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
next prev parent reply other threads:[~2014-10-30 14:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 14:10 David Howells
2014-10-30 14:36 ` Miklos Szeredi [this message]
2014-10-30 14:47 ` David Howells
2014-10-30 16:37 ` Miklos Szeredi
2014-10-31 9:46 ` [PATCH fixed] vfs: make first argument of dir_context.actor typed Miklos Szeredi
2014-10-31 10:28 ` Al Viro
2014-10-31 10:18 ` [PATCH] Overlayfs: ovl_fill_merge() should use container_of() rather than direct cast David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJfpegv5dqfgze-9pxDD-O19tctS-4P12NsO2oCo5SF1bqhhHA@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®