From patchwork Tue Sep 20 22:43:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namjae Jeon X-Patchwork-Id: 12982753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5D67C6FA82 for ; Tue, 20 Sep 2022 22:44:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230264AbiITWoE (ORCPT ); Tue, 20 Sep 2022 18:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbiITWnx (ORCPT ); Tue, 20 Sep 2022 18:43:53 -0400 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B3B26A4A3; Tue, 20 Sep 2022 15:43:51 -0700 (PDT) Received: by mail-pl1-f176.google.com with SMTP id f23so3854014plr.6; Tue, 20 Sep 2022 15:43:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=uAS0iDLxzD353KsDs4kAYxP485Qmoe2eFMWR1njqlns=; b=5kg6iZ5rQHI0lXuSGBKRldARqo5CY0wqoVfSlGH7R2kbmjIogfR4VNSeeYSxiV5DAz hdes+MP59NVUj80O5ini1Mq0cU5iCTpmGPldv4Z1l6KshFXUPv02uiwq2N7o+nFyRxYe rFc67r3qK6LOU/ePTyXmfVTzkkPo1GrAiUXLl8fPvDYi/AEXAnNKEIm5yMskY3t2C0Ne nwNWBWonE9jIs5R8z00+rNdjcPrfbm6SICnwftSEKtIZkF+sgojdhNj+WhWqPJdPtONe nQVBbYbsfSTB31t4Hy0B5LPEGWZJd336lCm/DyZdXv65JRtYl4G2GhPmBRWpF9HX6vxW rF8g== X-Gm-Message-State: ACrzQf3lGp1/DqmT8mritpeDKoUXaj0+cihoftBhdqjJ6irVh+2ZoYZ/ JMYeACGyNxJGZm8dVM+nMiocPZxaeAs= X-Google-Smtp-Source: AMsMyM6qAGlo0dnx4uRcMkjhBrEGq4Ix91kKZWfpw0MRRun8xz6l+XGzCJ1wJKFvD3gX+GrlQNnaAQ== X-Received: by 2002:a17:902:f394:b0:176:b7b7:2 with SMTP id f20-20020a170902f39400b00176b7b70002mr1757505ple.57.1663713830948; Tue, 20 Sep 2022 15:43:50 -0700 (PDT) Received: from localhost.localdomain ([211.49.23.9]) by smtp.gmail.com with ESMTPSA id 13-20020a62140d000000b0053e93aa8fb9sm451352pfu.71.2022.09.20.15.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 15:43:50 -0700 (PDT) From: Namjae Jeon To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org Cc: smfrench@gmail.com, senozhatsky@chromium.org, tom@talpey.com, atteh.mailbox@gmail.com, Namjae Jeon , Steve French Subject: [PATCH v7 1/3] ksmbd: remove internal.h include Date: Wed, 21 Sep 2022 07:43:36 +0900 Message-Id: <20220920224338.22217-2-linkinjeon@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920224338.22217-1-linkinjeon@kernel.org> References: <20220920224338.22217-1-linkinjeon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Since vfs_path_lookup is exported, It should not be internal. Move vfs_path_lookup prototype in internal.h to linux/namei.h. Suggested-by: Al Viro Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- fs/internal.h | 2 -- fs/ksmbd/vfs.c | 2 -- include/linux/namei.h | 2 ++ 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/internal.h b/fs/internal.h index 87e96b9024ce..c994f0408b29 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -58,8 +58,6 @@ extern int finish_clean_context(struct fs_context *fc); */ extern int filename_lookup(int dfd, struct filename *name, unsigned flags, struct path *path, struct path *root); -extern int vfs_path_lookup(struct dentry *, struct vfsmount *, - const char *, unsigned int, struct path *); int do_rmdir(int dfd, struct filename *name); int do_unlinkat(int dfd, struct filename *name); int may_linkat(struct user_namespace *mnt_userns, struct path *link); diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c index 4fcf96a01c16..d994ee1f2c18 100644 --- a/fs/ksmbd/vfs.c +++ b/fs/ksmbd/vfs.c @@ -18,8 +18,6 @@ #include #include -#include "../internal.h" /* for vfs_path_lookup */ - #include "glob.h" #include "oplock.h" #include "connection.h" diff --git a/include/linux/namei.h b/include/linux/namei.h index caeb08a98536..40c693525f79 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -63,6 +63,8 @@ extern struct dentry *kern_path_create(int, const char *, struct path *, unsigne extern struct dentry *user_path_create(int, const char __user *, struct path *, unsigned int); extern void done_path_create(struct path *, struct dentry *); extern struct dentry *kern_path_locked(const char *, struct path *); +int vfs_path_lookup(struct dentry *, struct vfsmount *, const char *, + unsigned int, struct path *); extern struct dentry *try_lookup_one_len(const char *, struct dentry *, int); extern struct dentry *lookup_one_len(const char *, struct dentry *, int);