linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Shakeel Butt <shakeelb@google.com>
Cc: Greg Thelen <gthelen@google.com>, Jan Kara <jack@suse.cz>,
	Michal Hocko <mhocko@suse.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfs: remove might_sleep() from clear_inode()
Date: Wed, 8 Nov 2017 02:24:49 +0000	[thread overview]
Message-ID: <20171108022448.GW21978@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20171108004354.40308-1-shakeelb@google.com>

On Tue, Nov 07, 2017 at 04:43:54PM -0800, Shakeel Butt wrote:
> Commit 7994e6f72543 ("vfs: Move waiting for inode writeback from
> end_writeback() to evict_inode()") removed inode_sync_wait() from
> end_writeback() and commit dbd5768f87ff ("vfs: Rename end_writeback()
> to clear_inode()") renamed end_writeback() to clear_inode(). After
> these patches there is no sleeping operation in clear_inode(). So,
> remove might_sleep() from it.

Point, but... this is far from the worst annoyance in clear_inode().
Starting with "BUG_ON() under spin_lock_irq() is antisocial and
not in a good way", of course, but that's not all - the whole
cycling of ->tree_lock has already been done back in
truncate_inode_pages_final() and we'd better have called that
in all cases when ->i_data might have ever contained anything.

The whole thing looks bogus these days...  I wonder if we should
simply move the remaining paranoia into destroy_inode() and get
rid of the I_CLEAR completely...

--
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>

      reply	other threads:[~2017-11-08  2:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08  0:43 [PATCH] vfs: remove might_sleep() from clear_inode() Shakeel Butt
2017-11-08  2:24 ` Al Viro [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=20171108022448.GW21978@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shakeelb@google.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;
as well as URLs for NNTP newsgroup(s).