[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070302002818.GF10643@holomorphy.com>
Date: Thu, 1 Mar 2007 16:28:18 -0800
From: Bill Irwin <bill.irwin@...cle.com>
To: Adam Litke <agl@...ibm.com>
Cc: torvalds@...ux-foundation.org, ebiederm@...ssion.com,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments
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@...cle.com>
-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists