From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_INFO_IOC ioctls for ocfs2 v4.
Date: Thu, 31 Dec 2009 12:13:13 -0800 [thread overview]
Message-ID: <20091231201313.GC3301@mail.oracle.com> (raw)
In-Reply-To: <1262247524-26824-2-git-send-email-tristan.ye@oracle.com>
On Thu, Dec 31, 2009 at 04:18:44PM +0800, Tristan Ye wrote:
> +int ocfs2_info_handle_unknown(struct inode *inode,
> + struct ocfs2_info_request __user *user_req)
> +{
> + int status = 0;
> + struct ocfs2_info_request req;
> +
> + if (copy_from_user(&req, user_req, sizeof(struct ocfs2_info_request))) {
> + status = -EFAULT;
> + goto bail;
> + }
> +
> + req.ir_flags &= ~OCFS2_INFO_FL_FILLED;
> +
> + if (copy_to_user((struct ocfs2_info_request __user *)user_req, &req,
> + sizeof(struct ocfs2_info_request))) {
Don't need the cast of user_req here. It's already of the
correct type.
Joel
--
"When ideas fail, words come in very handy."
- Goethe
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2009-12-31 20:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-31 8:18 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Add stuffs associated with ocfs2_info_request ioctls to ioctl.h Tristan Ye
2009-12-31 8:18 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Add new OCFS2_INFO_IOC ioctls for ocfs2 v4 Tristan Ye
2009-12-31 20:13 ` Joel Becker [this message]
2009-12-31 20:10 ` [Ocfs2-devel] [PATCH 1/2] Ocfs2: Add stuffs associated with ocfs2_info_request ioctls to ioctl.h Joel Becker
2010-01-04 2:36 ` tristan
2010-01-04 8:58 ` Joel Becker
2010-01-04 9:21 ` tristan
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=20091231201313.GC3301@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.