aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 1bc4701ef4f0..30162a59621a 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -410,7 +410,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
410 return error; 410 return error;
411 411
412no_id: 412no_id:
413 if (shp->mlock_user) /* shmflg & SHM_HUGETLB case */ 413 if (is_file_hugepages(file) && shp->mlock_user)
414 user_shm_unlock(size, shp->mlock_user); 414 user_shm_unlock(size, shp->mlock_user);
415 fput(file); 415 fput(file);
416no_file: 416no_file: