Messages in this thread | | | Date | Wed, 24 Sep 2008 20:41:49 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [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
| |