linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfs: remove might_sleep() from clear_inode()
@ 2017-11-08  0:43 Shakeel Butt
  2017-11-08  2:24 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Shakeel Butt @ 2017-11-08  0:43 UTC (permalink / raw)
  To: Alexander Viro, Greg Thelen, Jan Kara, Michal Hocko, Johannes Weiner
  Cc: Andrew Morton, linux-mm, linux-fsdevel, linux-kernel, Shakeel Butt

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.

Signed-off-by: Shakeel Butt <shakeelb@google.com>
---
 fs/inode.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/inode.c b/fs/inode.c
index d1e35b53bb23..528f3159b928 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -497,7 +497,6 @@ EXPORT_SYMBOL(__remove_inode_hash);
 
 void clear_inode(struct inode *inode)
 {
-	might_sleep();
 	/*
 	 * We have to cycle tree_lock here because reclaim can be still in the
 	 * process of removing the last page (in __delete_from_page_cache())
-- 
2.15.0.403.gc27cc4dac6-goog

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vfs: remove might_sleep() from clear_inode()
  2017-11-08  0:43 [PATCH] vfs: remove might_sleep() from clear_inode() Shakeel Butt
@ 2017-11-08  2:24 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2017-11-08  2:24 UTC (permalink / raw)
  To: Shakeel Butt
  Cc: Greg Thelen, Jan Kara, Michal Hocko, Johannes Weiner,
	Andrew Morton, linux-mm, linux-fsdevel, linux-kernel

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-08  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08  0:43 [PATCH] vfs: remove might_sleep() from clear_inode() Shakeel Butt
2017-11-08  2:24 ` Al Viro

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