Commits
Pavel Emelyanov authored ecc8634e8b6
vfs: fix lock inversion in drop_pagecache_sb() Backport mainstream commit: eccb95cee4f0d56faa46ef22fb94dd4a3578d3eb originally done by Dmitry Monakhov. Fix longstanding lock inversion in drop_pagecache_sb by dropping inode_lock before calling __invalidate_mapping_pages(). We just have to make sure inode won't go away from under us by keeping reference to it and putting the reference only after we have safely resumed the scan of the inode list. A bit tricky but not too bad... Signed-off-by: Jan Kara <jack@suse.cz> Cc: Fengguang Wu <wfg@mail.ustc.edu.cn> Cc: David Chinner <dgc@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> I also merged here one of rhel5 patches called linux-2.6-mm-prevent-cpu-lockups-in-invalidate_mapping_pages.patch: From: Larry Woodman <lwoodman@redhat.com> Subject: [mm] prevent cpu lockups in invalidate_mapping_pages Invalidate_mapping_pages() can take long long enough to incur cpu lockup messages. Bugzilla: 427798 invalidate_mapping_pages() loops through every page between start and end without rescheduling. This can cause the cpu lockup to occur if there are enough pages when called from the drop_caches code. The attached upstream patch calls cond_resched() after each pvec is processed to prevent the cpu lockup. Fixes RHEL5-U2 blocker BZ427798 Acked-by: Rik van Riel <riel@redhat.com> (116673) http://bugzilla.openvz.org/show_bug.cgi?id=946 Signed-off-by: Pavel Emelyanov <xemul@openvz.org>