mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mm + fs: store shadow entries in page cache
Reclaim will be leaving shadow entries in the page cache radix tree upon evicting the real page. As those pages are found from the LRU, an iput() can lead to the inode being freed concurrently. At this point, reclaim must no longer install shadow pages because the inode freeing code needs to ensure the page tree is really empty. Add an address_space flag, AS_EXITING, that the inode freeing code sets under the tree lock before doing the final truncate. Reclaim will check for this flag before installing shadow pages. Signed-off-by: Johannes Weiner <[email protected]> Reviewed-by: Rik van Riel <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Bob Liu <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Greg Thelen <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Jan Kara <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Luigi Semenzato <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Metin Doslu <[email protected]> Cc: Michel Lespinasse <[email protected]> Cc: Ozgun Erdogan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Roman Gushchin <[email protected]> Cc: Ryan Mallon <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0cd6144aad
commit
91b0abe36a
50 changed files with 147 additions and 65 deletions
|
|
@ -295,9 +295,9 @@ in the beginning of ->setattr unconditionally.
|
|||
->clear_inode() and ->delete_inode() are gone; ->evict_inode() should
|
||||
be used instead. It gets called whenever the inode is evicted, whether it has
|
||||
remaining links or not. Caller does *not* evict the pagecache or inode-associated
|
||||
metadata buffers; getting rid of those is responsibility of method, as it had
|
||||
been for ->delete_inode(). Caller makes sure async writeback cannot be running
|
||||
for the inode while (or after) ->evict_inode() is called.
|
||||
metadata buffers; the method has to use truncate_inode_pages_final() to get rid
|
||||
of those. Caller makes sure async writeback cannot be running for the inode while
|
||||
(or after) ->evict_inode() is called.
|
||||
|
||||
->drop_inode() returns int now; it's called on final iput() with
|
||||
inode->i_lock held and it returns true if filesystems wants the inode to be
|
||||
|
|
|
|||
Loading…
Reference in a new issue