summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scullp/mmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scullp/mmap.c b/scullp/mmap.c
index 619824e..c84f0e8 100644
--- a/scullp/mmap.c
+++ b/scullp/mmap.c
@@ -20,6 +20,7 @@
#include <linux/mm.h> /* everything */
#include <linux/errno.h> /* error codes */
#include <asm/pgtable.h>
+#include <linux/fs.h>
#include "scullp.h" /* local definitions */
@@ -102,7 +103,7 @@ struct vm_operations_struct scullp_vm_ops = {
int scullp_mmap(struct file *filp, struct vm_area_struct *vma)
{
- struct inode *inode = filp->f_dentry->d_inode;
+ struct inode *inode = filp->f_path.dentry->d_inode;
/* refuse to map if order is not 0 */
if (scullp_devices[iminor(inode)].order)