lkml.org 
[lkml]   [2008]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] mm: tiny-shmem fix lor, mmap_sem vs i_mutex
On Wed, 24 Sep 2008, Matt Mackall wrote:
>
> Is there any reason I shouldn't use truncate() in regular shmem.c if I
> were to unify the two files?

The lock ordering bug is a good reason not to use do_truncate()
in either. Once Nick's fixup is in mainline, try the unification
based on that, including his #ifndef CONFIG_MMU which is good for
documentation.

But I don't know how ugly all the #ifdef'ing will end up: at the
time you created mm/tiny-shmem.c, we had a stronger embargo on
#ifdefs in *.c than is fashionable today.

If we're hell-bent on #ifdefs throughout mm/shmem.c, I wouldn't
mind scattering some CONFIG_SWAPs in there too, would cut out
lots of overhead when swap unconfigured. But again, how ugly?

Hugh


\
 
 \ /
  Last update: 2008-09-24 21:51    [W:0.096 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site