diff --git a/[refs] b/[refs] index 5b6185f3bf9a..6234f2ec9bea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0e4dcbef1c0c3e29f9c7f824359445d385b2649a +refs/heads/master: 058a457ef0ce28d595af53d6103db73332383cbc diff --git a/trunk/fs/btrfs/file.c b/trunk/fs/btrfs/file.c index abcb91867b56..ce0cd29efa9e 100644 --- a/trunk/fs/btrfs/file.c +++ b/trunk/fs/btrfs/file.c @@ -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; }