From patchwork Fri Aug 7 19:54:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Nesterov X-Patchwork-Id: 6972851 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B3A7EC05AC for ; Fri, 7 Aug 2015 19:56:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9F76205F7 for ; Fri, 7 Aug 2015 19:56:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0C44320607 for ; Fri, 7 Aug 2015 19:56:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946298AbbHGT4O (ORCPT ); Fri, 7 Aug 2015 15:56:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37249 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946293AbbHGT4M (ORCPT ); Fri, 7 Aug 2015 15:56:12 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 8B89C2FF; Fri, 7 Aug 2015 19:56:11 +0000 (UTC) Received: from tranklukator.brq.redhat.com (dhcp-1-102.brq.redhat.com [10.34.1.102]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t77Ju80q018421; Fri, 7 Aug 2015 15:56:09 -0400 Received: by tranklukator.brq.redhat.com (nbSMTP-1.00) for uid 500 oleg@redhat.com; Fri, 7 Aug 2015 21:54:05 +0200 (CEST) Date: Fri, 7 Aug 2015 21:54:01 +0200 From: Oleg Nesterov To: Al Viro , Dave Chinner , Dave Hansen , Jan Kara Cc: "Paul E. McKenney" , Peter Zijlstra , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] change sb_writers to use percpu_rw_semaphore Message-ID: <20150807195401.GA28529@redhat.com> References: <20150722211513.GA19986@redhat.com> <20150722211541.GA20017@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150722211541.GA20017@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 07/22, Oleg Nesterov wrote: > > +static void sb_freeze_unlock(struct super_block *sb) > +{ > + int level; > + > + for (level = 0; level < SB_FREEZE_LEVELS; ++level) > + percpu_up_write(sb->s_writers.rw_sem + level); > } OK, this is not exactly right, see the fix below. Otherwise seems to work, but see another email I'll send in reply to 0/4. Oleg. --- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/super.c +++ b/fs/super.c @@ -1237,7 +1237,7 @@ static void sb_freeze_unlock(struct super_block *sb) { int level; - for (level = 0; level < SB_FREEZE_LEVELS; ++level) + for (level = SB_FREEZE_LEVELS; --level >= 0; ) percpu_up_write(sb->s_writers.rw_sem + level); }