Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200353
b: refs/heads/master
c: 058a457
h: refs/heads/master
i:
  200351: d20f743
v: v3
  • Loading branch information
Miao Xie authored and Chris Mason committed Jun 11, 2010
1 parent a606a52 commit 609f19e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e4dcbef1c0c3e29f9c7f824359445d385b2649a
refs/heads/master: 058a457ef0ce28d595af53d6103db73332383cbc
9 changes: 8 additions & 1 deletion trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,8 +1189,15 @@ static const struct vm_operations_struct btrfs_file_vm_ops = {

static int btrfs_file_mmap(struct file *filp, struct vm_area_struct *vma)
{
vma->vm_ops = &btrfs_file_vm_ops;
struct address_space *mapping = filp->f_mapping;

if (!mapping->a_ops->readpage)
return -ENOEXEC;

file_accessed(filp);
vma->vm_ops = &btrfs_file_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;

return 0;
}

Expand Down

0 comments on commit 609f19e

Please sign in to comment.