Commit 1cf1d22a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] hugetlbfs: don't implement read/write file_ops

From Rohit Seth.

We're currently disabling read() and write() against hugetlbfs files via the
address_space ops.  But that's a bit awkward, and results in reads and writes
instantiating useless, non-uptodate 4k pagecache against the inodes.

The patch removes the read, write and sendfile file_operations entries.  So
the caller will get their -EINVAL without us ever having to go to the
pagecache layer.
parent 2a6cb303
......@@ -457,11 +457,8 @@ static struct address_space_operations hugetlbfs_aops = {
};
struct file_operations hugetlbfs_file_operations = {
.read = generic_file_read,
.write = generic_file_write,
.mmap = hugetlbfs_file_mmap,
.fsync = simple_sync_file,
.sendfile = generic_file_sendfile,
};
static struct inode_operations hugetlbfs_dir_inode_operations = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment