]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - fs/inode.c
mm + fs: store shadow entries in page cache
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 3 Apr 2014 21:47:49 +0000 (14:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:01 +0000 (16:21 -0700)
commit91b0abe36a7b2b3b02d7500925a5f8455334f0e5
treee3d2cb9400fbfb24500a082721c1123b7a3942c0
parent0cd6144aadd2afd19d1aca880153530c52957604
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 <hannes@cmpxchg.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Bob Liu <bob.liu@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jan Kara <jack@suse.cz>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Luigi Semenzato <semenzato@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Metin Doslu <metin@citusdata.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Ozgun Erdogan <ozgun@citusdata.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Roman Gushchin <klamm@yandex-team.ru>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
50 files changed:
Documentation/filesystems/porting
drivers/staging/lustre/lustre/llite/llite_lib.c
fs/9p/vfs_inode.c
fs/affs/inode.c
fs/afs/inode.c
fs/bfs/inode.c
fs/block_dev.c
fs/btrfs/inode.c
fs/cifs/cifsfs.c
fs/coda/inode.c
fs/ecryptfs/super.c
fs/exofs/inode.c
fs/ext2/inode.c
fs/ext3/inode.c
fs/ext4/inode.c
fs/f2fs/inode.c
fs/fat/inode.c
fs/freevxfs/vxfs_inode.c
fs/fuse/inode.c
fs/gfs2/super.c
fs/hfs/inode.c
fs/hfsplus/super.c
fs/hostfs/hostfs_kern.c
fs/hpfs/inode.c
fs/inode.c
fs/jffs2/fs.c
fs/jfs/inode.c
fs/kernfs/inode.c
fs/logfs/readwrite.c
fs/minix/inode.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/nfs/nfs4super.c
fs/nilfs2/inode.c
fs/ntfs/inode.c
fs/ocfs2/inode.c
fs/omfs/inode.c
fs/proc/inode.c
fs/reiserfs/inode.c
fs/sysv/inode.c
fs/ubifs/super.c
fs/udf/inode.c
fs/ufs/inode.c
fs/xfs/xfs_super.c
include/linux/fs.h
include/linux/mm.h
include/linux/pagemap.h
mm/filemap.c
mm/truncate.c
mm/vmscan.c