From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH rebased] sysfs: return correct error code on unimplemented mmap()
Date: Wed, 30 Oct 2013 16:50:47 +0200 [thread overview]
Message-ID: <52711CC7.8080107@mentor.com> (raw)
In-Reply-To: <1383134912-31152-1-git-send-email-vladimir_zapolskiy@mentor.com>
Greg,
On 10/30/13 14:08, Vladimir Zapolskiy wrote:
> Both POSIX.1-2008 and Linux Programmer's Manual have a dedicated return
> error code for a case, when a file doesn't support mmap(), it's ENODEV.
>
> This change replaces overloaded EINVAL with ENODEV in a situation
> described above for sysfs binary files.
>
> Signed-off-by: Vladimir Zapolskiy<vladimir_zapolskiy@mentor.com>
> Cc: Greg Kroah-Hartman<gregkh@linuxfoundation.org>
> ---
> fs/sysfs/file.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index 0d7368d4..382db3c 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -477,7 +477,6 @@ static int sysfs_bin_mmap(struct file *file, struct vm_area_struct *vma)
> if (!sysfs_get_active(of->sd))
> goto out_unlock;
>
> - rc = -EINVAL;
> if (!battr->mmap)
> goto out_put;
>
as you asked the patch is rebased on top of linux-next, if you encounter
any problems related to the change, please let me know.
Thanks,
Vladimir
prev parent reply other threads:[~2013-10-30 14:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 16:28 [PATCH] sysfs: return correct error code on unimplemented mmap() Vladimir Zapolskiy
2013-10-28 16:35 ` Greg Kroah-Hartman
2013-10-28 17:22 ` Vladimir Zapolskiy
2013-10-29 23:05 ` Greg Kroah-Hartman
2013-10-30 12:08 ` [PATCH rebased] " Vladimir Zapolskiy
2013-10-30 14:50 ` Vladimir Zapolskiy [this message]
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=52711CC7.8080107@mentor.com \
--to=vladimir_zapolskiy@mentor.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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.