Skip to content

Commit

Permalink
x86, msr: Use file_inode(), not f_mapping->host
Browse files Browse the repository at this point in the history
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.uk

Signed-off-by: Andre Richter <andre.o.richter@gmail.com>
Link: http://lkml.kernel.org/r/1381224142-3267-1-git-send-email-andre.o.richter@gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Andre Richter authored and H. Peter Anvin committed Oct 8, 2013
1 parent 49449c3 commit 1224987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static struct class *msr_class;
static loff_t msr_seek(struct file *file, loff_t offset, int orig)
{
loff_t ret;
struct inode *inode = file->f_mapping->host;
struct inode *inode = file_inode(file);

mutex_lock(&inode->i_mutex);
switch (orig) {
Expand Down

0 comments on commit 1224987

Please sign in to comment.