From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbYKAQti (ORCPT ); Sat, 1 Nov 2008 12:49:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751828AbYKAQt1 (ORCPT ); Sat, 1 Nov 2008 12:49:27 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:43285 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774AbYKAQt0 (ORCPT ); Sat, 1 Nov 2008 12:49:26 -0400 Date: Sat, 1 Nov 2008 09:49:24 -0700 (PDT) From: Linus Torvalds To: Al Viro cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC][PATCH] saner FASYNC handling on file close In-Reply-To: <20081031232830.GX28946@ZenIV.linux.org.uk> Message-ID: References: <20081031232830.GX28946@ZenIV.linux.org.uk> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 Oct 2008, Al Viro wrote: > > As it is, all instances of ->release() for files that have > ->fasync() need to remember to evict file from fasync lists; forgetting > that creates a hole and we actually have a bunch that *does* forget. > > So let's keep our lives simple - let __fput() check FASYNC in > file->f_flags and call ->fasync() there if it's been set. And lose > that crap in ->release() instances - leaving it there is still valid, > but we don't have to bother anymore. > > Comments? This looks like "obviously the right thing". Done. Linus