Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp752818ybg; Wed, 23 Oct 2019 05:29:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEczb8ySp3ZBjL6S2KWdXxl3YqgDzC0zFpL4Fhg7Y+rpCeVCTuC+qgODE9lRr0YxYodcjQ X-Received: by 2002:a17:906:1505:: with SMTP id b5mr33148353ejd.195.1571833770562; Wed, 23 Oct 2019 05:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571833770; cv=none; d=google.com; s=arc-20160816; b=Ws/3bAjeP/gzmseh4gl3aoFqPK9vzzgRMHABoFsALTFkad/xeZSuSE++VMfdtRKPPl 6EY03kfYAeWlrq59HP6xbLCIjTkbCtwZAq49cl1dGks9+RgWwJGdYmIQH/cO+YmQtcLR ZX2CJgCMySjzd6FsWEiZae/5byYKdNs6jg1jRJ9pDBklVycAN5e4c9TzR7xs11B6cuhh N0f3x0EqhIREj5lT4/quM7Sy+MJyiVsBN8vGX0p2lJl2PekOVI/GTdyA94rQ4iCJSIpw E6sxbQgV+FxGGE029pVDe/D2xn86HtF8GTcLGyyoK/fN5rfjyK2lOBWxToSBGAlOKplB F4kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xw43BjDqDDvXAEhEkP9s9vwhn0UY1zRUGg2YrgDrX08=; b=WXg383guBfc/fqL9gNr8L3aCzf/iSoE2U9dMBxRW5dVDvs4iy2Oy2933iQgDtkXhaN btN1KsKLfR016M9dhS0xF4hntcZrDP03iIti7bDs7ejw3qdN5PwyDj9/yncbrhagpH/A S9tTOLzhoE7mSf9MimGUHJvqjKbSz71PvwtQFWqtdBUIn8MdYWgeJWjW99KfjaIcV6H8 3AYQbQz4it28nPuL4WddFK1yYwu+XCdeelHZdig7j6+GuLxXGVcCCTYrAwLTVDfKGoQi qFGYZEBEHGhowpFV9UgueP3IjApbQGVVnk/+xIpgwUM6+xU4wqHApSJrXA2ShMM2/5ey 1R4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si12326463ejj.90.2019.10.23.05.29.05; Wed, 23 Oct 2019 05:29:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389423AbfJWGvA (ORCPT + 99 others); Wed, 23 Oct 2019 02:51:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:41002 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727194AbfJWGvA (ORCPT ); Wed, 23 Oct 2019 02:51:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9B113B549; Wed, 23 Oct 2019 06:50:58 +0000 (UTC) Date: Wed, 23 Oct 2019 08:50:57 +0200 From: Michal Hocko To: Johannes Weiner Cc: Andrew Morton , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 1/2] mm: memcontrol: remove dead code from memory_max_write() Message-ID: <20191023065057.GC754@dhcp22.suse.cz> References: <20191022201518.341216-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191022201518.341216-1-hannes@cmpxchg.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 22-10-19 16:15:17, Johannes Weiner wrote: > When the reclaim loop in memory_max_write() is ^C'd or similar, we set > err to -EINTR. But we don't return err. Once the limit is set, we > always return success (nbytes). Delete the dead code. > > Signed-off-by: Johannes Weiner Acked-by: Michal Hocko > --- > mm/memcontrol.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index 055975b0b3a3..ff90d4e7df37 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -6122,10 +6122,8 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, > if (nr_pages <= max) > break; > > - if (signal_pending(current)) { > - err = -EINTR; > + if (signal_pending(current)) > break; > - } > > if (!drained) { > drain_all_stock(memcg); > -- > 2.23.0 > -- Michal Hocko SUSE Labs