public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Irwin <bill.irwin@oracle.com>
To: Adam Litke <agl@us.ibm.com>
Cc: torvalds@linux-foundation.org, ebiederm@xmission.com,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments
Date: Thu, 1 Mar 2007 16:28:18 -0800	[thread overview]
Message-ID: <20070302002818.GF10643@holomorphy.com> (raw)
In-Reply-To: <20070301234608.29532.66932.stgit@localhost.localdomain>

On Thu, Mar 01, 2007 at 03:46:08PM -0800, Adam Litke wrote:
>  static inline int is_file_hugepages(struct file *file)
>  {
> -	return file->f_op == &hugetlbfs_file_operations;
> +	if (file->f_op == &hugetlbfs_file_operations)
> +		return 1;
> +	if (is_file_shm_hugepages(file))
> +		return 1;
> +
> +	return 0;
>  }
...
> +int is_file_shm_hugepages(struct file *file)
> +{
> +	int ret = 0;
> +
> +	if (file->f_op == &shm_file_operations) {
> +		struct shm_file_data *sfd;
> +		sfd = shm_file_data(file);
> +		ret = is_file_hugepages(sfd->file);
> +	}
> +	return ret;

A comment to prepare others for the impending doubletake might be nice.
Or maybe just open-coding the equality check for &huetlbfs_file_operations
in is_file_shm_hugepages() if others find it as jarring as I. Please
extend my ack to any follow-up fiddling with that.

The patch addresses relatively straightforward issues and naturally at
that.

Acked-by: William Irwin <bill.irwin@oracle.com>


-- wli

  reply	other threads:[~2007-03-02  0:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01 23:46 [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments Adam Litke
2007-03-02  0:28 ` Bill Irwin [this message]
2007-03-07 23:03   ` Eric W. Biederman
2007-03-07 23:26     ` Adam Litke
2007-03-07 23:56       ` Bill Irwin
2007-03-07 23:40     ` Bill Irwin
2007-03-08  1:09       ` Eric W. Biederman

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=20070302002818.GF10643@holomorphy.com \
    --to=bill.irwin@oracle.com \
    --cc=agl@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox