diff options
| author | Amir Goldstein <amir73il@gmail.com> | 2025-06-07 13:53:03 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-07-18 11:09:29 +0200 |
| commit | 4e301d858af17ae2ce56886296e5458c5a08219a (patch) | |
| tree | 2334373c7920868f933ae24fb06cf84ade90d5ca /fs/backing-file.c | |
| parent | bc9241367aac08de44633fd957b2452a6da8e6d4 (diff) | |
| download | net-4e301d858af17ae2ce56886296e5458c5a08219a.tar.gz | |
fs: constify file ptr in backing_file accessor helpers
Add internal helper backing_file_set_user_path() for the only
two cases that need to modify backing_file fields.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/20250607115304.2521155-2-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/backing-file.c')
| -rw-r--r-- | fs/backing-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/backing-file.c b/fs/backing-file.c index 763fbe9b72b227..8c7396bff121b3 100644 --- a/fs/backing-file.c +++ b/fs/backing-file.c @@ -41,7 +41,7 @@ struct file *backing_file_open(const struct path *user_path, int flags, return f; path_get(user_path); - *backing_file_user_path(f) = *user_path; + backing_file_set_user_path(f, user_path); error = vfs_open(real_path, f); if (error) { fput(f); @@ -65,7 +65,7 @@ struct file *backing_tmpfile_open(const struct path *user_path, int flags, return f; path_get(user_path); - *backing_file_user_path(f) = *user_path; + backing_file_set_user_path(f, user_path); error = vfs_tmpfile(real_idmap, real_parentpath, f, mode); if (error) { fput(f); |
