Re: [PATCH v4 08/10] mmap locking API: add MMAP_LOCK_INITIALIZER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 14, 2020 at 05:43:51PM -0700, Michel Lespinasse wrote:
> @@ -90,7 +90,7 @@ static struct mm_struct tboot_mm = {
                                            ^^^^^^^^
>  	.pgd            = swapper_pg_dir,
>  	.mm_users       = ATOMIC_INIT(2),
>  	.mm_count       = ATOMIC_INIT(1),
> -	.mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
> +	.mmap_sem       = MMAP_LOCK_INITIALIZER(init_mm.mmap_sem),
                                                ^^^^^^^

Shome mishtake, shirley?

I don't see that this particular patch buys us much.  The name 'mmap_sem'
is still used, and I appreciate we abstract away the type of the lock,
but wouldn't this be better?

-	.mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
+	MMAP_LOCK_INITIALIZER(tboot_mm),





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux