aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 02faa54dbf5a..047b823e6bf0 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -254,8 +254,10 @@ struct mempolicy *shm_get_policy(struct vm_area_struct *vma, unsigned long addr)
254 254
255 if (sfd->vm_ops->get_policy) 255 if (sfd->vm_ops->get_policy)
256 pol = sfd->vm_ops->get_policy(vma, addr); 256 pol = sfd->vm_ops->get_policy(vma, addr);
257 else 257 else if (vma->vm_policy)
258 pol = vma->vm_policy; 258 pol = vma->vm_policy;
259 else
260 pol = current->mempolicy;
259 return pol; 261 return pol;
260} 262}
261#endif 263#endif