From: "Chen, Tim C" <tim.c.chen@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Yang Shi <yang.shi@linux.alibaba.com>
Cc: "Huang, Ying" <ying.huang@intel.com>,
"minchan@kernel.org" <minchan@kernel.org>,
"daniel.m.jordan@oracle.com" <daniel.m.jordan@oracle.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [v5 PATCH 1/2] mm: swap: check if swap backing device is congested or not
Date: Thu, 10 Jan 2019 23:40:01 +0000 [thread overview]
Message-ID: <045D8A5597B93E4EBEDDCBF1FC15F5097E16F8E2@fmsmsx121.amr.corp.intel.com> (raw)
In-Reply-To: <20190110153147.1baf4c88bf0dd3b8a78aad08@linux-foundation.org>
> >
> > + if (si->flags & (SWP_BLKDEV | SWP_FS)) {
>
> I re-read your discussion with Tim and I must say the reasoning behind this
> test remain foggy.
I was worried that the dereference
inode = si->swap_file->f_mapping->host;
is not always safe for corner cases.
So the test makes sure that the dereference is valid.
>
> What goes wrong if we just remove it?
If the dereference to get inode is always safe, we can remove it.
Thanks.
Tim
next prev parent reply other threads:[~2019-01-10 23:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 19:27 Yang Shi
2019-01-03 19:27 ` [v5 PATCH 2/2] mm: swap: add comment for swap_vma_readahead Yang Shi
2019-01-04 2:25 ` Huang, Ying
2019-01-04 2:25 ` Huang, Ying
2019-01-10 20:49 ` [v5 PATCH 1/2] mm: swap: check if swap backing device is congested or not Yang Shi
2019-01-10 23:20 ` Andrew Morton
2019-01-10 23:31 ` Andrew Morton
2019-01-10 23:40 ` Chen, Tim C [this message]
2019-01-11 0:56 ` Yang Shi
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=045D8A5597B93E4EBEDDCBF1FC15F5097E16F8E2@fmsmsx121.amr.corp.intel.com \
--to=tim.c.chen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.m.jordan@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=yang.shi@linux.alibaba.com \
--cc=ying.huang@intel.com \
/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