git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Link libshare directly to libzfs
[zfs.git]
/
module
/
zfs
/
zpl_file.c
diff --git
a/module/zfs/zpl_file.c
b/module/zfs/zpl_file.c
index
0e90b78
..
fc2b813
100644
(file)
--- a/
module/zfs/zpl_file.c
+++ b/
module/zfs/zpl_file.c
@@
-240,9
+240,15
@@
zpl_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
static int
zpl_mmap(struct file *filp, struct vm_area_struct *vma)
{
static int
zpl_mmap(struct file *filp, struct vm_area_struct *vma)
{
- znode_t *zp = ITOZ(filp->f_mapping->host);
+ struct inode *ip = filp->f_mapping->host;
+ znode_t *zp = ITOZ(ip);
int error;
int error;
+ error = -zfs_map(ip, vma->vm_pgoff, (caddr_t *)vma->vm_start,
+ (size_t)(vma->vm_end - vma->vm_start), vma->vm_flags);
+ if (error)
+ return (error);
+
error = generic_file_mmap(filp, vma);
if (error)
return (error);
error = generic_file_mmap(filp, vma);
if (error)
return (error);