Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964806AbWBMTFz (ORCPT ); Mon, 13 Feb 2006 14:05:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964808AbWBMTFy (ORCPT ); Mon, 13 Feb 2006 14:05:54 -0500 Received: from smtp.osdl.org ([65.172.181.4]:4485 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S964806AbWBMTFx (ORCPT ); Mon, 13 Feb 2006 14:05:53 -0500 Date: Mon, 13 Feb 2006 11:05:37 -0800 (PST) From: Linus Torvalds To: "Michael S. Tsirkin" cc: Hugh Dickins , Gleb Natapov , Benjamin Herrenschmidt , Petr Vandrovec , Nick Piggin , Badari Pulavarty , Linux Kernel Mailing List , openib-general@openib.org Subject: Re: madvise MADV_DONTFORK/MADV_DOFORK In-Reply-To: <20060213154114.GO32041@mellanox.co.il> Message-ID: References: <20060213154114.GO32041@mellanox.co.il> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 716 Lines: 24 On Mon, 13 Feb 2006, Michael S. Tsirkin wrote: > > Add madvise options to control whether memory range is inherited across fork. > Useful e.g. for when hardware is doing DMA from/into these pages. > > Signed-off-by: Michael S. Tsirkin > > - if (mpnt->vm_flags & VM_DONTCOPY) { > + if (mpnt->vm_flags & (VM_DONTCOPY | VM_DONTFORK)) { Why? That VM_DONTCOPY _is_ DONTFORK. Don't add a new useless DONTFORK that doesn't have any value. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/