diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-03 11:14:02 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-03 11:14:02 -0700 |
| commit | 33fc69a05c50f00f1218408a56348bcab95b831d (patch) | |
| tree | 042a6027a4f068ceea1d929b6a1c3dc5438a5dea /include/linux/fs.h | |
| parent | 829745b75a1af25bfb0c7dc36640548c98c57169 (diff) | |
| parent | 180a9cc3fd6a020746fbd7f97b9b62295a325fd2 (diff) | |
| download | lwn-33fc69a05c50f00f1218408a56348bcab95b831d.tar.gz lwn-33fc69a05c50f00f1218408a56348bcab95b831d.zip | |
Merge tag 'pull-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull d_name audit update from Al Viro:
"Simplifying ->d_name audits, easy part.
Turn dentry->d_name into an anon union of const struct qsrt (d_name
itself) and a writable alias (__d_name).
With constification of some struct qstr * arguments of functions that
get &dentry->d_name passed to them, that ends up with all
modifications provably done only in fs/dcache.c (and a fairly small
part of it).
Any new places doing modifications will be easy to find - grep for
__d_name will suffice"
* tag 'pull-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
make it easier to catch those who try to modify ->d_name
generic_ci_validate_strict_name(): constify name argument
afs_dir_search: constify qstr argument
afs_edit_dir_{add,remove}(): constify qstr argument
exfat_find(): constify qstr argument
security_dentry_init_security(): constify qstr argument
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index d3c023ff1a86..caa8e8879f4b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3716,7 +3716,8 @@ int generic_ci_d_compare(const struct dentry *dentry, unsigned int len, * happens when a directory is casefolded and the filesystem is strict * about its encoding. */ -static inline bool generic_ci_validate_strict_name(struct inode *dir, struct qstr *name) +static inline bool generic_ci_validate_strict_name(struct inode *dir, + const struct qstr *name) { if (!IS_CASEFOLDED(dir) || !sb_has_strict_encoding(dir->i_sb)) return true; @@ -3731,7 +3732,8 @@ static inline bool generic_ci_validate_strict_name(struct inode *dir, struct qst return !utf8_validate(dir->i_sb->s_encoding, name); } #else -static inline bool generic_ci_validate_strict_name(struct inode *dir, struct qstr *name) +static inline bool generic_ci_validate_strict_name(struct inode *dir, + const struct qstr *name) { return true; } |
