[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160126125456.GK2948@linux.intel.com>
Date: Tue, 26 Jan 2016 07:54:56 -0500
From: Matthew Wilcox <willy@...ux.intel.com>
To: "Williams, Dan J" <dan.j.williams@...el.com>
Cc: "kirill@...temov.name" <kirill@...temov.name>,
"jack@...e.cz" <jack@...e.cz>,
"syzkaller@...glegroups.com" <syzkaller@...glegroups.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"kcc@...gle.com" <kcc@...gle.com>,
"vbabka@...e.cz" <vbabka@...e.cz>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"dvyukov@...gle.com" <dvyukov@...gle.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"gthelen@...gle.com" <gthelen@...gle.com>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"mhocko@...e.com" <mhocko@...e.com>,
"jack@...e.com" <jack@...e.com>,
"glider@...gle.com" <glider@...gle.com>,
"sasha.levin@...cle.com" <sasha.levin@...cle.com>,
"Wilcox, Matthew R" <matthew.r.wilcox@...el.com>,
"j-nomura@...jp.nec.com" <j-nomura@...jp.nec.com>
Subject: Re: mm: WARNING in __delete_from_page_cache
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).
Powered by blists - more mailing lists