From patchwork Mon Nov 28 02:12:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 9448959 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 DF3B26071C for ; Mon, 28 Nov 2016 02:13:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1B96204BF for ; Mon, 28 Nov 2016 02:13:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C63CA20649; Mon, 28 Nov 2016 02:13:01 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 74D59204BF for ; Mon, 28 Nov 2016 02:13:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753983AbcK1CM4 (ORCPT ); Sun, 27 Nov 2016 21:12:56 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:54379 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754107AbcK1CMN (ORCPT ); Sun, 27 Nov 2016 21:12:13 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0459D20AB2; Sun, 27 Nov 2016 21:12:12 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 27 Nov 2016 21:12:12 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=themaw.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=K0E2o37ySprtJQN 8IJU7MNiwtKk=; b=siKtNzVHDefQAyGfsj7Wprm/P4NdVNUxu1vZcD+/1Ffr0tr UH9IsMS4Ais9lqOFcLuJ41ijjnfYOD8oahgW60LNTyWZKM4YTp53l8sO85sH/b4G Lqvf5hc0K3yJGeiFuFs7zsTova3M9mgS/z81rCKu1Fz+JxaO0AEHsyz0croI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=K0E2o37ySprtJQN8IJU7MNiwtKk=; b=qFY3Jpd8D/mHFgYcZG9O GhlWCm2jAzrbtCMeyiAm72uKUzcAbfrNu2rk5e6iLv/80Mn5Nalq6JWal97p9dOV h75ZgTKjAOz9HpvR9Md/79lMHqa9AKjG5GzWV4Hg67Oqb0tucPzO5AIVjG0xtClm UNwHdSzI8HuWGXmNbJ/HDxo= X-ME-Sender: X-Sasl-enc: QFs0LatfK5Pp4h6T3auTfWlDNZa946TS5LgPk1QolPJB 1480299131 Received: from pluto.themaw.net (106-69-59-107.dyn.iinet.net.au [106.69.59.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 7DE5D7E697; Sun, 27 Nov 2016 21:12:11 -0500 (EST) Received: from pluto.themaw.net (localhost [127.0.0.1]) by pluto.themaw.net (Postfix) with ESMTP id 708C3A006A; Mon, 28 Nov 2016 10:12:09 +0800 (AWST) Subject: [PATCH 5/7] vfs - constify path parameter of path_has_submounts() From: Ian Kent To: Andrew Morton Cc: autofs mailing list , Kernel Mailing List , "Eric W. Biederman" , linux-fsdevel , Omar Sandoval , Al Viro Date: Mon, 28 Nov 2016 10:12:09 +0800 Message-ID: <148029912941.27779.3775940087450770440.stgit@pluto.themaw.net> In-Reply-To: <148029910861.27779.4517883721395202453.stgit@pluto.themaw.net> References: <148029910861.27779.4517883721395202453.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 From: Ian Kent path_has_submounts() doesn't modify the passed in path parameter, and shouldn't need to, make that usage explicit. Signed-off-by: Ian Kent Cc: Al Viro Cc: Eric W. Biederman Cc: Omar Sandoval --- fs/dcache.c | 2 +- include/linux/dcache.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 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 diff --git a/fs/dcache.c b/fs/dcache.c index 719d8b4..29bc910 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1298,7 +1298,7 @@ static enum d_walk_ret path_check_mount(void *data, struct dentry *dentry) * Return true if the parent or its subdirectories contain * a mount point in the current namespace. */ -int path_has_submounts(struct path *parent) +int path_has_submounts(const struct path *parent) { struct check_mount data = { .mnt = parent->mnt, .mounted = 0 }; diff --git a/include/linux/dcache.h b/include/linux/dcache.h index f835bd4..c965e44 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -254,7 +254,7 @@ extern struct dentry *d_find_alias(struct inode *); extern void d_prune_aliases(struct inode *); /* test whether we have any submounts in a subdir tree */ -extern int path_has_submounts(struct path *); +extern int path_has_submounts(const struct path *); /* * This adds the entry to the hash queues.