mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 06:18:45 -04:00
Merge tag 'exportfs-6.9' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/cel/linux
Merge exportfs fixes from Chuck Lever: * tag 'exportfs-6.9' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/cel/linux: fs: Create a generic is_dot_dotdot() utility exportfs: fix the fallback implementation of the get_name export operation Link: https://lore.kernel.org/r/BDC2AEB4-7085-4A7C-8DE8-A659FE1DBA6A@oracle.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
@@ -2928,6 +2928,17 @@ extern bool path_is_under(const struct path *, const struct path *);
|
||||
|
||||
extern char *file_path(struct file *, char *, int);
|
||||
|
||||
/**
|
||||
* is_dot_dotdot - returns true only if @name is "." or ".."
|
||||
* @name: file name to check
|
||||
* @len: length of file name, in bytes
|
||||
*/
|
||||
static inline bool is_dot_dotdot(const char *name, size_t len)
|
||||
{
|
||||
return len && unlikely(name[0] == '.') &&
|
||||
(len == 1 || (len == 2 && name[1] == '.'));
|
||||
}
|
||||
|
||||
#include <linux/err.h>
|
||||
|
||||
/* needed for stackable file system support */
|
||||
|
||||
Reference in New Issue
Block a user