Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753556AbbDTQs3 (ORCPT ); Mon, 20 Apr 2015 12:48:29 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:36138 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbbDTQs2 (ORCPT ); Mon, 20 Apr 2015 12:48:28 -0400 Message-ID: <1429548505.7346.263.camel@edumazet-glaptop2.roam.corp.google.com> Subject: Re: [RFC PATCH] fs: use a sequence counter instead of file_lock in fd_install From: Eric Dumazet To: Mateusz Guzik Cc: Al Viro , Andrew Morton , "Paul E. McKenney" , Yann Droneaud , Konstantin Khlebnikov , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 20 Apr 2015 09:48:25 -0700 In-Reply-To: <1429548382.7346.261.camel@edumazet-glaptop2.roam.corp.google.com> References: <20150416121628.GA20615@mguzik> <1429307216.7346.255.camel@edumazet-glaptop2.roam.corp.google.com> <20150417221646.GA15589@mguzik> <20150417230252.GE889@ZenIV.linux.org.uk> <1429386098.7346.260.camel@edumazet-glaptop2.roam.corp.google.com> <20150420134103.GB2513@mguzik> <1429548382.7346.261.camel@edumazet-glaptop2.roam.corp.google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 566 Lines: 21 On Mon, 2015-04-20 at 09:46 -0700, Eric Dumazet wrote: > > Hey, that's because I really meant (during the week end) old = xchg(&fdt->fd[fd], file); if (unlikely(old && old != file)) filp_close(old, files); That's going to be hard. If you thought this problem was trivial, it probably means you missed something. -- 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/