Commit 6725839b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] give hugetlbfs a set_page_dirty a_op

Seems that nobody has tested direct IO into hugetlb pages yet.  The VFS gets
upset about running set_page_dirty() against a non-uptodate page.

So give hugetlbfs inodes a private no-op ->set_page_dirty() to isolate them
from all that.
parent afcde6ef
...@@ -450,10 +450,19 @@ static int hugetlbfs_symlink(struct inode * dir, struct dentry *dentry, const ch ...@@ -450,10 +450,19 @@ static int hugetlbfs_symlink(struct inode * dir, struct dentry *dentry, const ch
return error; return error;
} }
/*
* For direct-IO reads into hugetlb pages
*/
int hugetlbfs_set_page_dirty(struct page *page)
{
return 0;
}
static struct address_space_operations hugetlbfs_aops = { static struct address_space_operations hugetlbfs_aops = {
.readpage = hugetlbfs_readpage, .readpage = hugetlbfs_readpage,
.prepare_write = hugetlbfs_prepare_write, .prepare_write = hugetlbfs_prepare_write,
.commit_write = hugetlbfs_commit_write .commit_write = hugetlbfs_commit_write,
.set_page_dirty = hugetlbfs_set_page_dirty,
}; };
struct file_operations hugetlbfs_file_operations = { struct file_operations hugetlbfs_file_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