Skip to contentSkip to conversation

ovl: remove redundant IOCB_DIO_CALLER_COMP clearing

PATCH Applied Seong-Gwang Heo 4 participants 4 messages Oct 9, 2025 – Oct 10, 2025 Overlay filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ovl: remove redundant IOCB_DIO_CALLER_COMP clearing

The backing_file_write_iter() function, which is called immediately after this code, already contains identical logic to clear the IOCB_DIO_CALLER_COMP flag along with the same explanatory comment. There is no need to duplicate this operation in the overlayfs code.

---
 fs/overlayfs/file.c | 5 -----
 1 file changed, 5 deletions(-)
fs/overlayfs/file.c +0 -5
index f5b8877d5fe2..31a98f10fc4b 100644
@@ -369,11 +369,6 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)
 	if (!ovl_should_sync(OVL_FS(inode->i_sb)))
 		ifl &= ~(IOCB_DSYNC | IOCB_SYNC);
 
-	/*
-	 * Overlayfs doesn't support deferred completions, don't copy
-	 * this property in case it is set by the issuer.
-	 */
-	ifl &= ~IOCB_DIO_CALLER_COMP;
 	ret = backing_file_write_iter(realfile, iter, iocb, ifl, &ctx);
 
 out_unlock:
Signature · 1 line
2.49.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Seong-Gwang Heo

The backing_file_write_iter() function, which is called immediately after this code, already contains identical logic to clear the IOCB_DIO_CALLER_COMP flag along with the same explanatory comment. There is no need to duplicate this operation in the overlayfs code.

Fixes a6293b3e285c ("fs: factor out backing_file_{read,write}_iter() helpers")

Thanks,
Miklos

maintainer Reviewed-by
#2 lore raw
Quoted 9 lines · Miklos Szeredi
Quoted 7 lines · Seong-Gwang Heo

The backing_file_write_iter() function, which is called immediately after this code, already contains identical logic to clear the IOCB_DIO_CALLER_COMP flag along with the same explanatory comment. There is no need to duplicate this operation in the overlayfs code.

Quoted 5 lines
Quoted 1 line
Fixes a6293b3e285c ("fs: factor out backing_file_{read,write}_iter() helpers")

Thanks Seong-Gwang!

Christian,

Could you pick up this fix for the next vfs fixes PR?

Thanks,
Amir.

#3 lore raw
In reply to Seong-Gwang Heo
Quoted 8 lines · Seong-Gwang Heo

The backing_file_write_iter() function, which is called immediately after this code, already contains identical logic to clear the IOCB_DIO_CALLER_COMP flag along with the same explanatory comment. There is no need to duplicate this operation in the overlayfs code.

[...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] ovl: remove redundant IOCB_DIO_CALLER_COMP clearing

      https://git.kernel.org/vfs/vfs/c/7933a585d70e