mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Andre Richter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	tglx@linutronix.de, hpa@linux.intel.com,
	andre.o.richter@gmail.com
Subject: [tip:x86/cleanups] x86, msr: Use file_inode(), not f_mapping-> host
Date: Tue, 8 Oct 2013 12:03:43 -0700	[thread overview]
Message-ID: <tip-122498738417c73943b71294c60ec34fc110f5d6@git.kernel.org> (raw)
In-Reply-To: <1381224142-3267-1-git-send-email-andre.o.richter@gmail.com>

Commit-ID:  122498738417c73943b71294c60ec34fc110f5d6
Gitweb:     http://git.kernel.org/tip/122498738417c73943b71294c60ec34fc110f5d6
Author:     Andre Richter <andre.o.richter@gmail.com>
AuthorDate: Tue, 8 Oct 2013 11:22:22 +0200
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 8 Oct 2013 12:01:29 -0700

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.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>
---
 arch/x86/kernel/msr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 88458fa..05266b5 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -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) {

      reply	other threads:[~2013-10-08 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08  9:22 [PATCH 1/1] arch/x86/kernel/msr.c: Add another file_inode() Andre Richter
2013-10-08 19:03 ` tip-bot for Andre Richter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-122498738417c73943b71294c60ec34fc110f5d6@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=andre.o.richter@gmail.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome