diff options
author | Amir Goldstein <amir73il@gmail.com> | 2023-07-16 14:47:14 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-11-24 10:37:44 +0100 |
commit | b8e1425bae856b189e2365ff795e30fdd9e77049 (patch) | |
tree | 3f055c84560b8c44d460595993bd5b875c88d92b /fs/overlayfs | |
parent | 1c8aa833034a00617866ea4738a40491e3e23902 (diff) | |
download | linux-stable-b8e1425bae856b189e2365ff795e30fdd9e77049.tar.gz linux-stable-b8e1425bae856b189e2365ff795e30fdd9e77049.tar.bz2 linux-stable-b8e1425bae856b189e2365ff795e30fdd9e77049.zip |
fs: move permission hook out of do_iter_read()
We recently moved fsnotify hook, rw_verify_area() and other checks from
do_iter_write() out to its two callers.
for consistency, do the same thing for do_iter_read() - move the
rw_verify_area() checks and fsnotify hook to the callers vfs_iter_read()
and vfs_readv().
This aligns those vfs helpers with the pattern used in vfs_read() and
vfs_iocb_iter_read() and the vfs write helpers, where all the checks are
in the vfs helpers and the do_* or call_* helpers do the work.
This is needed for fanotify "pre content" events.
Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231122122715.2561213-13-amir73il@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/overlayfs')
0 files changed, 0 insertions, 0 deletions