Patch "ovl: add helper ovl_file_modified()" has been added to the 6.6-stable tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 23 lines · Sasha Levin
This is a note to let you know that I've just added the patch titled
ovl: add helper
ovl_file_modified()to the 6.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summaryThe filename of the patch is:
ovl-add-helper-ovl_file_modified.patch
and it can be found in the queue-6.6 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
commit
f87db32c0cdadc7eea4a37560867da0bd0bb87e8Author: Amir Goldstein <[email protected]> Date: Wed Sep 27 13:43:44 2023 +0300ovl: add helper
ovl_file_modified()
Quoted 9 lines
[ Upstream commit
c002728f608183449673818076380124935e6b9b]A simple wrapper for updating ovl inode size/mtime, to conform with
ovl_file_accessed().Signed-off-by Amir Goldstein <[email protected]>Stable-dep-of:
7c98f7cb8fda("remove call_{read,write}_iter() functions")Signed-off-by Sasha Levin <[email protected]>
No objection to this patch, except for the fact that I think it is not in the best
interest of the stable tree to backport 7c98f7cb8fda as is.
I suggest that you consider backporting only the parts of 7c98f7cb8fda that open code call_{read,write}_iter() in call sites (some or all), if you need those
as dependencies but actually leave the wrappers in the stable tree.
If the bots selected 7c98f7cb8fda to stable because of the Fixes: tag, then I think that Fixes: tag was misleading the stable bots in this case.
Thanks,
Amir.
Quoted 65 lines
fs/overlayfs/file.c +11
-7@@ -235,6 +235,12 @@ static loff_t ovl_llseek(struct file *file, loff_t offset, int whence)return ret; } +static void ovl_file_modified (struct file *file) +{ +/* Update size/mtime */ +ovl_copyattr (file_inode (file)); +} +static void ovl_file_accessed (struct file *file) {struct inode *inode, *upperinode;@@ -290,10 +296,8 @@ static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req)struct kiocb *orig_iocb = aio_req->orig_iocb;if (iocb->ki_flags &IOCB_WRITE ) { -struct inode *inode =file_inode (orig_iocb->ki_filp); -kiocb_end_write (iocb); -ovl_copyattr (inode); +ovl_file_modified (orig_iocb->ki_filp); } orig_iocb->ki_pos = iocb->ki_pos;@@ -403,7 +407,7 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) ovl_iocb_to_rwf(ifl));file_end_write (real.file);/* Update size */ -ovl_copyattr (inode); +ovl_file_modified (file); }else {struct ovl_aio_req *aio_req;@@ -489,7 +493,7 @@ static ssize_t ovl_splice_write(struct pipe_inode_info *pipe, struct file *out,file_end_write (real.file);/* Update size */ -ovl_copyattr (inode); +ovl_file_modified (out);revert_creds (old_cred);fdput (real);@@ -570,7 +574,7 @@ static long ovl_fallocate(struct file *file, int mode, loff_t offset, loff_t lenrevert_creds (old_cred);/* Update size */ -ovl_copyattr (inode); +ovl_file_modified (file);fdput (real);@@ -654,7 +658,7 @@ static loff_t ovl_copyfile(struct file *file_in, loff_t pos_in,revert_creds (old_cred);/* Update size */ -ovl_copyattr (inode_out); +ovl_file_modified (file_out);fdput (real_in);fdput (real_out);