Merge tag 'x86-asm-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-2.6-microblaze.git] / fs / readdir.c
index c8c46e2..278bc02 100644 (file)
@@ -96,6 +96,10 @@ int iterate_dir(struct file *file, struct dir_context *ctx)
        if (res)
                goto out;
 
+       res = fsnotify_file_perm(file, MAY_READ);
+       if (res)
+               goto out;
+
        res = down_read_killable(&inode->i_rwsem);
        if (res)
                goto out;