>From d13477d654e60ec4434c266d11828347a135ca32 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 4 Oct 2016 10:56:00 +0200 Subject: [PATCH] ext4: Use exclusive locking for ext4_readdir() We use file->private_data to track information for readdir calls. As such we cannot allow two readdir calls to happen at the same time for one struct file as they end up corrupting the information. For now just revert back to the old behavior where readdirs are synchronized. Signed-off-by: Jan Kara --- fs/ext4/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 67415e0e6af0..5ee86243620b 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -651,7 +651,7 @@ int ext4_check_all_de(struct inode *dir, struct buffer_head *bh, void *buf, const struct file_operations ext4_dir_operations = { .llseek = ext4_dir_llseek, .read = generic_read_dir, - .iterate_shared = ext4_readdir, + .iterate = ext4_readdir, .unlocked_ioctl = ext4_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = ext4_compat_ioctl, -- 2.6.6