]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - ipc/shm.c
r8169: do not enable the TBI for the 8168 and the 81x0
[linux-2.6-omap-h63xx.git] / ipc / shm.c
index b27d31f3aabac51493d55c02b55ab545adcf955c..3818fae625c5252363380fa9c7a521e8b5c1a7d1 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -61,8 +61,7 @@ static struct ipc_ids init_shm_ids;
 
 #define shm_unlock(shp)                        \
        ipc_unlock(&(shp)->shm_perm)
-#define shm_buildid(ns, id, seq)       \
-       ipc_buildid(&shm_ids(ns), id, seq)
+#define shm_buildid(id, seq)   ipc_buildid(id, seq)
 
 static int newseg(struct ipc_namespace *, struct ipc_params *);
 static void shm_open(struct vm_area_struct *vma);
@@ -434,10 +433,11 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
        if (IS_ERR(file))
                goto no_file;
 
-       error = -ENOSPC;
        id = shm_addid(ns, shp);
-       if(id == -1) 
+       if (id < 0) {
+               error = id;
                goto no_id;
+       }
 
        shp->shm_cprid = task_tgid_vnr(current);
        shp->shm_lprid = 0;
@@ -445,7 +445,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
        shp->shm_ctim = get_seconds();
        shp->shm_segsz = size;
        shp->shm_nattch = 0;
-       shp->shm_perm.id = shm_buildid(ns, id, shp->shm_perm.seq);
+       shp->shm_perm.id = shm_buildid(id, shp->shm_perm.seq);
        shp->shm_file = file;
        /*
         * shmid gets reported as "inode#" in /proc/pid/maps.