Commit 12249873 authored by Andre Richter's avatar Andre Richter Committed by H. Peter Anvin

x86, msr: Use file_inode(), not f_mapping->host

As discussed in [1], exchange f_mapping->host with file_inode().  This
is a bug, but happens to be non-manifest in this case.

[1] http://lkml.kernel.org/r/20131007190357.GA13318@ZenIV.linux.org.ukSigned-off-by: default avatarAndre Richter <andre.o.richter@gmail.com>
Link: http://lkml.kernel.org/r/1381224142-3267-1-git-send-email-andre.o.richter@gmail.comSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 49449c30
...@@ -46,7 +46,7 @@ static struct class *msr_class; ...@@ -46,7 +46,7 @@ static struct class *msr_class;
static loff_t msr_seek(struct file *file, loff_t offset, int orig) static loff_t msr_seek(struct file *file, loff_t offset, int orig)
{ {
loff_t ret; loff_t ret;
struct inode *inode = file->f_mapping->host; struct inode *inode = file_inode(file);
mutex_lock(&inode->i_mutex); mutex_lock(&inode->i_mutex);
switch (orig) { switch (orig) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment