Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753711AbYGMKnZ (ORCPT ); Sun, 13 Jul 2008 06:43:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752054AbYGMKnS (ORCPT ); Sun, 13 Jul 2008 06:43:18 -0400 Received: from x346.tv-sign.ru ([89.108.83.215]:55201 "EHLO mail.screens.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbYGMKnR (ORCPT ); Sun, 13 Jul 2008 06:43:17 -0400 Date: Sun, 13 Jul 2008 14:46:17 +0400 From: Oleg Nesterov To: Denys Vlasenko Cc: T?r?k Edwin , Linus Torvalds , Ingo Molnar , Roland McGrath , Thomas Gleixner , Andrew Morton , Linux Kernel Mailing List , Elias Oltmanns , Arjan van de Ven Subject: Re: [PATCH] x86_64: fix delayed signals Message-ID: <20080713104617.GA79@tv-sign.ru> References: <20080710215039.2A143154218@magilla.localdomain> <48791393.1020107@gmail.com> <200807122257.59047.vda.linux@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200807122257.59047.vda.linux@googlemail.com> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 27 On 07/12, Denys Vlasenko wrote: > > On Saturday 12 July 2008 22:26, T?r?k Edwin wrote: > > A bit off-topic, but something I noticed during the tests: > > In my original test I have rm-ed the files right after launching dd in > > the background, yet it still continued to write to the disk. > > I can understand that if the file is opened O_RDWR, you might seek back > > and read what you wrote, so Linux needs to actually do the write, > > but why does it insist on writing to the disk, on a file opened with > > O_WRONLY, after the file itself got unlinked? > > Because process can do > > fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_RDWR) Is it? SETFL_MASK doesn't have O_RDWR, and in any case setfl() changes ->f_flags, not ->f_mode. Oleg. -- 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/