mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
shmem: make shmem_inode_info::lock irq-safe
We are going to need to call shmem_charge() under tree_lock to get accoutning right on collapse of small tmpfs pages into a huge one. The problem is that tree_lock is irq-safe and lockdep is not happy, that we take irq-unsafe lock under irq-safe[1]. Let's convert the lock to irq-safe. [1] https://gist.github.com/kiryl/80c0149e03ed35dfaf26628b8e03cdbc Link: http://lkml.kernel.org/r/1466021202-61880-34-git-send-email-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
988ddb710b
commit
4595ef88d1
2 changed files with 28 additions and 26 deletions
|
|
@ -766,10 +766,10 @@ static void shm_add_rss_swap(struct shmid_kernel *shp,
|
|||
} else {
|
||||
#ifdef CONFIG_SHMEM
|
||||
struct shmem_inode_info *info = SHMEM_I(inode);
|
||||
spin_lock(&info->lock);
|
||||
spin_lock_irq(&info->lock);
|
||||
*rss_add += inode->i_mapping->nrpages;
|
||||
*swp_add += info->swapped;
|
||||
spin_unlock(&info->lock);
|
||||
spin_unlock_irq(&info->lock);
|
||||
#else
|
||||
*rss_add += inode->i_mapping->nrpages;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue