[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230422-uring-getdents-v2-5-2db1e37dc55e@codewreck.org>
Date: Wed, 10 May 2023 19:52:53 +0900
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Jens Axboe <axboe@...nel.dk>,
Pavel Begunkov <asml.silence@...il.com>,
Stefan Roesch <shr@...com>
Cc: Clay Harris <bugs@...ycon.org>, Dave Chinner <david@...morbit.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
io-uring@...r.kernel.org,
Dominique Martinet <asmadeus@...ewreck.org>
Subject: [PATCH v2 5/6] libfs: set FMODE_NOWAIT on dir open
the readdir can technically wait a bit on a spinlock, but that should
never wait for long enough to return EAGAIN -- just set the capability
flag on directories f_mode
Signed-off-by: Dominique Martinet <asmadeus@...ewreck.org>
---
fs/libfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/libfs.c b/fs/libfs.c
index 89cf614a3271..a3c7e42d90a7 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -81,6 +81,7 @@ EXPORT_SYMBOL(simple_lookup);
int dcache_dir_open(struct inode *inode, struct file *file)
{
file->private_data = d_alloc_cursor(file->f_path.dentry);
+ file->f_mode |= FMODE_NOWAIT;
return file->private_data ? 0 : -ENOMEM;
}
--
2.39.2
Powered by blists - more mailing lists