linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@linux.intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>
Cc: "kirill@shutemov.name" <kirill@shutemov.name>,
	"jack@suse.cz" <jack@suse.cz>,
	"syzkaller@googlegroups.com" <syzkaller@googlegroups.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"kcc@google.com" <kcc@google.com>,
	"vbabka@suse.cz" <vbabka@suse.cz>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"dvyukov@google.com" <dvyukov@google.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"gthelen@google.com" <gthelen@google.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"mhocko@suse.com" <mhocko@suse.com>,
	"jack@suse.com" <jack@suse.com>,
	"glider@google.com" <glider@google.com>,
	"sasha.levin@oracle.com" <sasha.levin@oracle.com>,
	"Wilcox, Matthew R" <matthew.r.wilcox@intel.com>,
	"j-nomura@ce.jp.nec.com" <j-nomura@ce.jp.nec.com>
Subject: Re: mm: WARNING in __delete_from_page_cache
Date: Tue, 26 Jan 2016 07:54:56 -0500	[thread overview]
Message-ID: <20160126125456.GK2948@linux.intel.com> (raw)
In-Reply-To: <1453779754.32645.3.camel@intel.com>

On Tue, Jan 26, 2016 at 03:42:34AM +0000, Williams, Dan J wrote:
> @@ -2907,7 +2912,12 @@ extern void replace_mount_options(struct super_block *sb, char *options);
>  
>  static inline bool io_is_direct(struct file *filp)
>  {
> -	return (filp->f_flags & O_DIRECT) || IS_DAX(file_inode(filp));

I think this should just be a one-liner:

-	return (filp->f_flags & O_DIRECT) || IS_DAX(file_inode(filp));
+	return (filp->f_flags & O_DIRECT) || IS_DAX(filp->f_mapping->host);

This does the right thing for block device inodes and filesystem inodes.
(see the opening stanzas of __dax_fault for an example).

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2016-01-26 12:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-24 10:48 mm: WARNING in __delete_from_page_cache Dmitry Vyukov
2016-01-24 23:04 ` Kirill A. Shutemov
2016-01-25 12:22   ` Jan Kara
2016-01-26  3:42     ` Williams, Dan J
2016-01-26  8:29       ` Jan Kara
2016-01-26 12:54       ` Matthew Wilcox [this message]
2016-01-26 13:36         ` Jan Kara
2016-01-26 16:59           ` Williams, Dan J
2016-01-27 22:04             ` Ross Zwisler
2016-01-28 19:51               ` Ross Zwisler
2016-01-27 18:02 ` Ross Zwisler
2016-01-27 18:07   ` Dmitry Vyukov

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=20160126125456.GK2948@linux.intel.com \
    --to=willy@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=gthelen@google.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=kcc@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew.r.wilcox@intel.com \
    --cc=mhocko@suse.com \
    --cc=sasha.levin@oracle.com \
    --cc=syzkaller@googlegroups.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).