From a61fc2cbdf6a753b7000dd216c62285a68755147 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 10 Apr 2018 16:35:42 -0700 Subject: [PATCH] ipc/shm.c: shm_split(): remove unneeded test for NULL shm_file_data.vm_ops This was added by the recent "ipc/shm.c: add split function to shm_vm_ops", but it is not necessary. Reviewed-by: Mike Kravetz Cc: Laurent Dufour Cc: Dan Williams Cc: Michal Hocko Cc: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/shm.c b/ipc/shm.c index 1a28b6a96449..5639345dbec9 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -415,7 +415,7 @@ static int shm_split(struct vm_area_struct *vma, unsigned long addr) struct file *file = vma->vm_file; struct shm_file_data *sfd = shm_file_data(file); - if (sfd->vm_ops && sfd->vm_ops->split) + if (sfd->vm_ops->split) return sfd->vm_ops->split(vma, addr); return 0; -- GitLab