[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <165516230198.21248.8675541854979948509.stgit@noble.brown>
Date: Tue, 14 Jun 2022 09:18:21 +1000
From: NeilBrown <neilb@...e.de>
To: Al Viro <viro@...iv.linux.org.uk>, Daire Byrne <daire@...g.com>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Chuck Lever <chuck.lever@...cle.com>
Cc: Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 05/12] VFS: export done_path_update()
This function will be be useful to nfsd, so export it.
done_path_create_wq() is now simple enough to be "static inline"
rather than an explicit export.
Signed-off-by: NeilBrown <neilb@...e.de>
---
fs/namei.c | 11 ++---------
include/linux/namei.h | 10 +++++++++-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index f13bff877e30..8ce7aa16b704 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1719,7 +1719,7 @@ struct dentry *lookup_hash_update_len(const char *name, int nlen,
}
EXPORT_SYMBOL(lookup_hash_update_len);
-static void done_path_update(struct path *path, struct dentry *dentry,
+void done_path_update(struct path *path, struct dentry *dentry,
wait_queue_head_t *wq)
{
struct inode *dir = path->dentry->d_inode;
@@ -1735,6 +1735,7 @@ static void done_path_update(struct path *path, struct dentry *dentry,
dput(dentry);
mnt_drop_write(path->mnt);
}
+EXPORT_SYMBOL(done_path_update);
static struct dentry *lookup_fast(struct nameidata *nd,
struct inode **inode,
@@ -3951,14 +3952,6 @@ struct dentry *kern_path_create(int dfd, const char *pathname,
}
EXPORT_SYMBOL(kern_path_create);
-void done_path_create_wq(struct path *path, struct dentry *dentry,
- wait_queue_head_t *wq)
-{
- done_path_update(path, dentry, wq);
- path_put(path);
-}
-EXPORT_SYMBOL(done_path_create_wq);
-
inline struct dentry *user_path_create(int dfd, const char __user *pathname,
struct path *path, unsigned int lookup_flags)
{
diff --git a/include/linux/namei.h b/include/linux/namei.h
index f75c6639dd1a..217aa6de9f25 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -64,11 +64,19 @@ extern struct dentry *user_path_create(int, const char __user *, struct path *,
extern struct dentry *lookup_hash_update_len(const char *name, int nlen,
struct path *path, unsigned int flags,
wait_queue_head_t *wq);
-extern void done_path_create_wq(struct path *, struct dentry *, wait_queue_head_t *wq);
+extern void done_path_update(struct path *, struct dentry *, wait_queue_head_t *);
+static inline void done_path_create_wq(struct path *path, struct dentry *dentry,
+ wait_queue_head_t *wq)
+{
+ done_path_update(path, dentry, wq);
+ path_put(path);
+}
+
static inline void done_path_create(struct path *path, struct dentry *dentry)
{
done_path_create_wq(path, dentry, NULL);
}
+
extern struct dentry *kern_path_locked(const char *, struct path *);
extern struct dentry *try_lookup_one_len(const char *, struct dentry *, int);
Powered by blists - more mailing lists