[PATCH] fs: allow inode time modification with IOCB_NOWAIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



generic/471 complains because it expects any write done with RWF_NOWAIT
to succeed as long as the blocks for the write are already instantiated.
This isn't necessarily a correct assumption, as there are other conditions
that can cause an RWF_NOWAIT write to fail with -EAGAIN even if the range
is already there.

Since the risk of blocking off this path is minor, just allow inode
time updates with IOCB_NOWAIT set. Then we can later decide if we should
catch this further down the stack.

Fixes: 4faa13bd5d3b ("fs: Add async write file modification handling.")
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
---
 fs/inode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/inode.c b/fs/inode.c
index 259ebf438893..98a48fbfa0ad 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -2150,8 +2150,6 @@ static int file_modified_flags(struct file *file, int flags)
 	ret = inode_needs_update_time(inode, &now);
 	if (ret <= 0)
 		return ret;
-	if (flags & IOCB_NOWAIT)
-		return -EAGAIN;
 
 	return __file_update_time(file, &now, ret);
 }
-- 
2.35.1

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux