Received: by 10.223.185.116 with SMTP id b49csp8508241wrg; Fri, 2 Mar 2018 03:07:00 -0800 (PST) X-Google-Smtp-Source: AG47ELsmJRS1Doi9ThYJmpWAYJ+pWzT7TwahdnxR7/Y/LeMROyfBR1PP1MAUfJmdHbWc9ulAoHdl X-Received: by 2002:a17:902:b086:: with SMTP id p6-v6mr3155191plr.67.1519988819861; Fri, 02 Mar 2018 03:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519988819; cv=none; d=google.com; s=arc-20160816; b=pLoOiSGfLs7LCviiibRFOlzaDJeUkDmQNBwQeWrW0ZfEe7y+XdvzG5S63QkFB8zY+t WKcU/XPY50VuaK3Gl6j9Bqj7XGv3+rS1ZKZ32l7J+hIW+WCCJnjTh2+3wmbcaWpJVGk6 UIpT0BRooZjq0WdsaYcPCDbY3EiktQj7NIoJwbXmUlmFez5WbOaErKY0FmnHy2yPHvhT SUHbSFaxSr/emdCb2IY/KbY/3NOAzNbyehxTsJ6KswsP+66mb0GtXdug5H10tjVFIHJi eOIY8WGfbT3SuuEqyI/kcbcS3XIFfmyDSTugy7QkJZrTn8Edlvl4a5n9bItms/M2ByAG /twA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/KUj+8pFowdtcdRq/FYjjQYXyHJvvg/Vwh3bntlV0jM=; b=vLGy0xU10bKdU30o/5i0GXQ4VeW+XnhtrmDf3HymYmJqq4dRca56gI4WEnYjyWAFdl UC5GZkuPe2kL8KUZ6LO7xZfQKzmC7rhsIJe+9j5IewHxCkZwEPQzxpiVybyuUsijt+bK Rvkgv4POTEx5ps6GOLlt1hGqYhrkRcH/8Ew0qBc79U122Pg8OfkDviARWytmDgErcP2Z gPiIRAvR4dQFbaWishSUih0RApqy8OSIv/f9MYpoZQq/W+kNMbSWE+UX3tDtuWppOaNy Q+/wM+4/8uW8OLLqUKJfABh8Sg4YewwH5IQpoO/KKF8Ov77ilaU8isnPT3FImOeATDck zcPA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si3857062pga.143.2018.03.02.03.06.45; Fri, 02 Mar 2018 03:06:59 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426828AbeCBLEg (ORCPT + 99 others); Fri, 2 Mar 2018 06:04:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50766 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423659AbeCBIzY (ORCPT ); Fri, 2 Mar 2018 03:55:24 -0500 Received: from localhost (clnet-b04-243.ikbnet.co.at [83.175.124.243]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BD0B21231; Fri, 2 Mar 2018 08:55:23 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Al Viro , Sasha Levin Subject: [PATCH 4.4 06/34] sget(): handle failures of register_shrinker() Date: Fri, 2 Mar 2018 09:51:02 +0100 Message-Id: <20180302084436.414587775@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302084435.842679610@linuxfoundation.org> References: <20180302084435.842679610@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Al Viro [ Upstream commit 9ee332d99e4d5a97548943b81c54668450ce641b ] Signed-off-by: Al Viro Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/super.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/fs/super.c +++ b/fs/super.c @@ -497,7 +497,11 @@ retry: hlist_add_head(&s->s_instances, &type->fs_supers); spin_unlock(&sb_lock); get_filesystem(type); - register_shrinker(&s->s_shrink); + err = register_shrinker(&s->s_shrink); + if (err) { + deactivate_locked_super(s); + s = ERR_PTR(err); + } return s; }