Skip to content

Commit

Permalink
ksmbd: remove internal.h include
Browse files Browse the repository at this point in the history
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 <viro@zeniv.linux.org.uk>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Namjae Jeon authored and Al Viro committed Apr 21, 2023
1 parent fe15c26 commit 211db0a
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions fs/internal.h
Original file line number Diff line number Diff line change
@@ -59,8 +59,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 mnt_idmap *idmap, const struct path *link);
2 changes: 0 additions & 2 deletions fs/ksmbd/vfs.c
Original file line number Diff line number Diff line change
@@ -19,8 +19,6 @@
#include <linux/sched/xacct.h>
#include <linux/crc32c.h>

#include "../internal.h" /* for vfs_path_lookup */

#include "glob.h"
#include "oplock.h"
#include "connection.h"
2 changes: 2 additions & 0 deletions include/linux/namei.h
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 211db0a

Please sign in to comment.