From: Anders Berg <anders.b...@intel.com> Use the generic mmap function to avoid possible deadlock on vmfs_mutex.
Signed-off-by: Anders Berg <anders.b...@intel.com> --- fs/vmfs/file.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/fs/vmfs/file.c b/fs/vmfs/file.c index 6e9030a..685073d 100644 --- a/fs/vmfs/file.c +++ b/fs/vmfs/file.c @@ -253,27 +253,6 @@ out: return status; } -static int vmfs_file_mmap(struct file *file, struct vm_area_struct *vma) -{ - struct dentry *dentry = file->f_path.dentry; - int status; - - VERBOSE("file %s/%s, address %lu - %lu\n", - DENTRY_PATH(dentry), vma->vm_start, vma->vm_end); - - mutex_lock(&vmfs_mutex); - status = vmfs_revalidate_inode(dentry); - mutex_unlock(&vmfs_mutex); - if (status) { - PARANOIA("%s/%s validation failed, error=%d\n", - DENTRY_PATH(dentry), status); - goto out; - } - status = generic_file_mmap(file, vma); -out: - return status; -} - static ssize_t vmfs_file_splice_read(struct file *file, loff_t *ppos, struct pipe_inode_info *pipe, size_t count, @@ -481,7 +460,7 @@ const struct file_operations vmfs_file_operations = { .write = do_sync_write, .aio_write = vmfs_file_aio_write, .unlocked_ioctl = vmfs_unlocked_ioctl, - .mmap = vmfs_file_mmap, + .mmap = generic_file_mmap, .open = vmfs_file_open, .release = vmfs_file_release, .fsync = vmfs_fsync, -- 1.7.9.5 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto