From: Andrew Morton Date: Tue, 10 Apr 2018 23:35:42 +0000 (-0700) Subject: ipc/shm.c: shm_split(): remove unneeded test for NULL shm_file_data.vm_ops X-Git-Tag: v5.15~9050^2~18 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=a61fc2cbdf6a753b7000dd216c62285a68755147;p=mirror_ubuntu-kernels.git 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 --- 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;