@@ -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)
{
@@ -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);
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@suse.de> --- fs/namei.c | 11 ++--------- include/linux/namei.h | 10 +++++++++- 2 files changed, 11 insertions(+), 10 deletions(-)