diff options
| author | Jiri Kosina <jkosina@suse.com> | 2026-04-16 22:01:18 +0300 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-04-16 22:01:18 +0300 |
| commit | d4eb7b2da66c848709e31585b9c371fa234abc39 (patch) | |
| tree | 5c6311cfa45567ecdcb8946a2252da7d55d1ac10 /include/linux/fs.h | |
| parent | 8b9a097eb2fc37b486afd81388c693bf3ab44466 (diff) | |
| parent | 69c02ffde6ed4d535fa4e693a9e572729cad3d0d (diff) | |
| download | linux-d4eb7b2da66c848709e31585b9c371fa234abc39.tar.xz | |
Merge branch 'for-7.1/core-v2' into for-linus
- fixed handling of 0-sized reports (Dmitry Torokhov)
- convert core code to __free() (Dmitry Torokhov)
- support for multiple batteries per HID device (Lucas Zampieri)
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2e4d1e8b0e71..8b3dd145b25e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2872,12 +2872,22 @@ u64 vfsmount_to_propagation_flags(struct vfsmount *mnt); extern char *file_path(struct file *, char *, int); +static inline bool name_is_dot(const char *name, size_t len) +{ + return unlikely(len == 1 && name[0] == '.'); +} + +static inline bool name_is_dotdot(const char *name, size_t len) +{ + return unlikely(len == 2 && name[0] == '.' && name[1] == '.'); +} + /** - * is_dot_dotdot - returns true only if @name is "." or ".." + * name_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) +static inline bool name_is_dot_dotdot(const char *name, size_t len) { return len && unlikely(name[0] == '.') && (len == 1 || (len == 2 && name[1] == '.')); @@ -3515,7 +3525,6 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, ssize_t simple_attr_write_signed(struct file *file, const char __user *buf, size_t len, loff_t *ppos); -struct ctl_table; int __init list_bdev_fs_names(char *buf, size_t size); #define __FMODE_EXEC ((__force int) FMODE_EXEC) |
