]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - ipc/shm.c
[PATCH] x86-64: x86_64 - Fix FS/GS registers for VT execution
[net-next-2.6.git] / ipc / shm.c
index 6d16bb6de7d296889b015b8ab6c8d480d2c14aa4..5bb617f6306e8df814398505393b15e2b0c3c0ee 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -42,7 +42,7 @@
 
 #include "util.h"
 
-static struct file_operations shm_file_operations;
+static const struct file_operations shm_file_operations;
 static struct vm_operations_struct shm_vm_ops;
 
 static struct ipc_ids init_shm_ids;
@@ -249,7 +249,7 @@ static int shm_release(struct inode *ino, struct file *file)
        return 0;
 }
 
-static struct file_operations shm_file_operations = {
+static const struct file_operations shm_file_operations = {
        .mmap           = shm_mmap,
        .release        = shm_release,
 #ifndef CONFIG_MMU
@@ -279,7 +279,7 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size)
        if (size < SHMMIN || size > ns->shm_ctlmax)
                return -EINVAL;
 
-       if (ns->shm_tot + numpages >= ns->shm_ctlall)
+       if (ns->shm_tot + numpages > ns->shm_ctlall)
                return -ENOSPC;
 
        shp = ipc_rcu_alloc(sizeof(*shp));