From patchwork Tue Jun 19 03:02:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 10473017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52E37601D7 for ; Tue, 19 Jun 2018 03:03:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DFB41FF1E for ; Tue, 19 Jun 2018 03:03:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42B7326D05; Tue, 19 Jun 2018 03:03:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 067531FF1E for ; Tue, 19 Jun 2018 03:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937229AbeFSDCi (ORCPT ); Mon, 18 Jun 2018 23:02:38 -0400 Received: from icp-osb-irony-out7.external.iinet.net.au ([203.59.1.107]:50332 "EHLO icp-osb-irony-out7.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755376AbeFSDC0 (ORCPT ); Mon, 18 Jun 2018 23:02:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AWEwBicShb/6c80XZcHgEGDINJgU8SK?= =?us-ascii?q?IN5lFZGAQEBAQEGgQ00kDiEKIF4HhgBhEACgl8hNhYBAgEBAQEBAQJtKIUpBiN?= =?us-ascii?q?WEBgBDAIYDgICRxAGE4UYDKpTghwaAogtgWiBC4dJgQyBB4E/hxqDOIJVAodJh?= =?us-ascii?q?Vc/izcJjwmIGIUjK5JqByqBUk0uCoJ+kFwyMHoBAY4KgkgBAQ?= X-IPAS-Result: =?us-ascii?q?A2AWEwBicShb/6c80XZcHgEGDINJgU8SKIN5lFZGAQEBAQE?= =?us-ascii?q?GgQ00kDiEKIF4HhgBhEACgl8hNhYBAgEBAQEBAQJtKIUpBiNWEBgBDAIYDgICR?= =?us-ascii?q?xAGE4UYDKpTghwaAogtgWiBC4dJgQyBB4E/hxqDOIJVAodJhVc/izcJjwmIGIU?= =?us-ascii?q?jK5JqByqBUk0uCoJ+kFwyMHoBAY4KgkgBAQ?= X-IronPort-AV: E=Sophos;i="5.51,241,1526313600"; d="scan'208";a="90294647" Received: from unknown (HELO pluto.themaw.net) ([118.209.60.167]) by icp-osb-irony-out7.iinet.net.au with ESMTP; 19 Jun 2018 11:02:04 +0800 Subject: [PATCH 2/6] autofs - fix clearing AUTOFS_EXP_LEAVES in autofs_expire_indirect() From: Ian Kent To: Andrew Morton Cc: linux-fsdevel , autofs mailing list , Kernel Mailing List Date: Tue, 19 Jun 2018 11:02:04 +0800 Message-ID: <152937732410.21213.7447294898147765076.stgit@pluto.themaw.net> In-Reply-To: <152937731702.21213.7371321165189170865.stgit@pluto.themaw.net> References: <152937731702.21213.7371321165189170865.stgit@pluto.themaw.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The expire flag AUTOFS_EXP_LEAVES is cleared before the second call to should_expire() in autofs_expire_indirect() but the parameter passed in the second call is incorrect. Fortunately AUTOFS_EXP_LEAVES expire flag has not been used for a long time but might be needed in the future so fix it rather than remove the expire leaves functionality. Signed-off-by: Ian Kent --- fs/autofs/expire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/autofs/expire.c b/fs/autofs/expire.c index 295feec10ea6..41855cdc5630 100644 --- a/fs/autofs/expire.c +++ b/fs/autofs/expire.c @@ -467,7 +467,7 @@ struct dentry *autofs_expire_indirect(struct super_block *sb, * things have changed. */ flags &= ~AUTOFS_EXP_LEAVES; - found = should_expire(expired, mnt, timeout, how); + found = should_expire(expired, mnt, timeout, flags); if (!found || found != expired) /* Something has changed, continue */ goto next;