X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=ipc%2Fshm.c;h=dbac8860c721ed64527cf87093dd9e717b7c703f;hb=fb1b83d3ff78168e10799627f231cf0c05c9d80d;hp=13282510bc0da71aa9789ff72ba015bede5c96e7;hpb=631517032f261f6fd35d11321cd2ba695573f2ed;p=cascardo%2Flinux.git diff --git a/ipc/shm.c b/ipc/shm.c index 13282510bc0d..dbac8860c721 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -476,13 +476,15 @@ static const struct file_operations shm_file_operations = { .mmap = shm_mmap, .fsync = shm_fsync, .release = shm_release, -#ifndef CONFIG_MMU .get_unmapped_area = shm_get_unmapped_area, -#endif .llseek = noop_llseek, .fallocate = shm_fallocate, }; +/* + * shm_file_operations_huge is now identical to shm_file_operations, + * but we keep it distinct for the sake of is_file_shm_hugepages(). + */ static const struct file_operations shm_file_operations_huge = { .mmap = shm_mmap, .fsync = shm_fsync, @@ -764,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