summaryrefslogtreecommitdiff
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2026-01-08 15:19:08 +0100
committerChristian Brauner <brauner@kernel.org>2026-01-12 14:01:33 +0100
commit85c871a02b0305f568d5aba6144fc6b2c96bd87d (patch)
treec50d9d4be66de0b9925140597f9b15265de939b3 /fs/overlayfs
parent5cf06ea56ee67209d4e9a0b381641fb062ecd2c3 (diff)
downloadlwn-85c871a02b0305f568d5aba6144fc6b2c96bd87d.tar.gz
lwn-85c871a02b0305f568d5aba6144fc6b2c96bd87d.zip
fs: add support for non-blocking timestamp updates
Currently file_update_time_flags unconditionally returns -EAGAIN if any timestamp needs to be updated and IOCB_NOWAIT is passed. This makes non-blocking direct writes impossible on file systems with granular enough timestamps. Pass IOCB_NOWAIT to ->update_time and return -EAGAIN if it could block. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260108141934.2052404-9-hch@lst.de Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index c0ce3519e4af..00c69707bda9 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -566,6 +566,8 @@ int ovl_update_time(struct inode *inode, enum fs_update_time type,
};
if (upperpath.dentry) {
+ if (flags & IOCB_NOWAIT)
+ return -EAGAIN;
touch_atime(&upperpath);
inode_set_atime_to_ts(inode,
inode_get_atime(d_inode(upperpath.dentry)));