-
Notifications
You must be signed in to change notification settings - Fork 0
/
mmap.c
33 lines (30 loc) · 1008 Bytes
/
mmap.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Copyright (c) 1998-2020 Erez Zadok
* Copyright (c) 2009 Shrikar Archak
* Copyright (c) 2003-2020 Stony Brook University
* Copyright (c) 2003-2020 The Research Foundation of SUNY
* Copyright (c) 2020-2021 Barnim Dzwillo @ Strato AG
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include "wrapfs.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
static ssize_t wrapfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
#else
static ssize_t wrapfs_direct_IO(int rw, struct kiocb *iocb,
const struct iovec *iov, loff_t offset,
unsigned long nr_segs)
#endif
{
/*
* This function should never be called directly. We need it
* to exist, to get past a check in open_check_o_direct(),
* which is called from do_last().
*/
return -EINVAL;
}
const struct address_space_operations wrapfs_aops = {
.direct_IO = wrapfs_direct_IO,
};