Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments

2007-03-07 Thread Eric W. Biederman
Bill Irwin <[EMAIL PROTECTED]> writes: > On Wed, Mar 07, 2007 at 04:03:17PM -0700, Eric W. Biederman wrote: >> I think the right answer is most likely to add an extra file method or >> two so we can remove the need for is_file_hugepages. >> There are still 4 calls to is_file_hugepages in ipc/shm.c

Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments

2007-03-07 Thread Bill Irwin
On Wed, Mar 07, 2007 at 05:26:48PM -0600, Adam Litke wrote: > :) Enter my remove-is_file_hugepages() patches (which I posted a few > weeks ago). I'll rework them and repost soon. That should help to make > all of this cleaner. Those were great. I've wanted something like them for a long, long ti

Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments

2007-03-07 Thread Bill Irwin
Bill Irwin <[EMAIL PROTECTED]> writes: >> A comment to prepare others for the impending doubletake might be nice. >> Or maybe just open-coding the equality check for &hugetlbfs_file_operations >> in is_file_shm_hugepages() if others find it as jarring as I. Please >> extend my ack to any follow-up

Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments

2007-03-07 Thread Adam Litke
On Wed, 2007-03-07 at 16:03 -0700, Eric W. Biederman wrote: > Bill Irwin <[EMAIL PROTECTED]> writes: > > > 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; > >>

Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments

2007-03-07 Thread Eric W. Biederman
Bill Irwin <[EMAIL PROTECTED]> writes: > 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) >> +retur

Re: [PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments

2007-03-01 Thread Bill Irwin
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)

[PATCH] Fix get_unmapped_area and fsync for hugetlb shm segments

2007-03-01 Thread Adam Litke
This patch provides the following hugetlb-related fixes to the recent stacked shm files changes: - Update is_file_hugepages() so it will reconize hugetlb shm segments. - get_unmapped_area must be called with the nested file struct to handle the sfd->file->f_ops->get_unmapped_area == NULL case