aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/mem.c')
-rw-r--r--drivers/char/mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 6f6e92a3102d..2c644afbcdd4 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -708,7 +708,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
708{ 708{
709 loff_t ret; 709 loff_t ret;
710 710
711 mutex_lock(&file->f_path.dentry->d_inode->i_mutex); 711 mutex_lock(&file_inode(file)->i_mutex);
712 switch (orig) { 712 switch (orig) {
713 case SEEK_CUR: 713 case SEEK_CUR:
714 offset += file->f_pos; 714 offset += file->f_pos;
@@ -725,7 +725,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
725 default: 725 default:
726 ret = -EINVAL; 726 ret = -EINVAL;
727 } 727 }
728 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); 728 mutex_unlock(&file_inode(file)->i_mutex);
729 return ret; 729 return ret;
730} 730}
731 731