X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ipc%2Fshm.c;h=faa46da99ebed7884ebb632f70ec7d79799d7f87;hb=e562aebc6ccd4385cbbf24debe88ab4bb500c5b4;hp=f239d87e0d37eea4a83106804035432f6c91c331;hpb=3fab191002b184e4390aa07c7149c6cc7b638ec7;p=pandora-kernel.git diff --git a/ipc/shm.c b/ipc/shm.c index f239d87e0d37..faa46da99ebe 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -555,12 +555,14 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss, in_use = shm_ids(ns).in_use; for (total = 0, next_id = 0; total < in_use; next_id++) { + struct kern_ipc_perm *ipc; struct shmid_kernel *shp; struct inode *inode; - shp = idr_find(&shm_ids(ns).ipcs_idr, next_id); - if (shp == NULL) + ipc = idr_find(&shm_ids(ns).ipcs_idr, next_id); + if (ipc == NULL) continue; + shp = container_of(ipc, struct shmid_kernel, shm_perm); inode = shp->shm_file->f_path.dentry->d_inode;