]> git.ipfire.org Git - thirdparty/kernel/linux.git/blobdiff - fs/readdir.c
fsnotify: optionally pass access range in file permission hooks
[thirdparty/kernel/linux.git] / fs / readdir.c
index c8c46e29443139d1e496bbb2236e4faf6af9effa..278bc025473274e77ca924f801ddfd5333d7c2cf 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;