diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-12-09 19:15:58 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-01-17 17:46:05 -0500 |
commit | 61bc24ac974a4873e3040765e640f62fe99d6226 (patch) | |
tree | e59e002852391aad4f1d4dfa409b819d12c2fa3b /fs/dcache.c | |
parent | 40384c840ea1944d7c5a392e8975ed088ecf0b37 (diff) |
make sure that DNAME_INLINE_LEN is a multiple of word size
... calling the number of words DNAME_INLINE_WORDS.
The next step will be to have a structure to hold inline name arrays
(both in dentry and in name_snapshot) and use that to alias the
existing arrays of unsigned char there. That will allow both
full-structure copies and convenient word-by-word accesses.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index b4d5e9e1e43d..ea0f0bea511b 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2748,9 +2748,7 @@ static void swap_names(struct dentry *dentry, struct dentry *target) /* * Both are internal. */ - unsigned int i; - BUILD_BUG_ON(!IS_ALIGNED(DNAME_INLINE_LEN, sizeof(long))); - for (i = 0; i < DNAME_INLINE_LEN / sizeof(long); i++) { + for (int i = 0; i < DNAME_INLINE_WORDS; i++) { swap(((long *) &dentry->d_iname)[i], ((long *) &target->d_iname)[i]); } |