|
@@ -555,12 +555,14 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss,
|
|
in_use = shm_ids(ns).in_use;
|
|
in_use = shm_ids(ns).in_use;
|
|
|
|
|
|
for (total = 0, next_id = 0; total < in_use; next_id++) {
|
|
for (total = 0, next_id = 0; total < in_use; next_id++) {
|
|
|
|
+ struct kern_ipc_perm *ipc;
|
|
struct shmid_kernel *shp;
|
|
struct shmid_kernel *shp;
|
|
struct inode *inode;
|
|
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;
|
|
continue;
|
|
|
|
+ shp = container_of(ipc, struct shmid_kernel, shm_perm);
|
|
|
|
|
|
inode = shp->shm_file->f_path.dentry->d_inode;
|
|
inode = shp->shm_file->f_path.dentry->d_inode;
|
|
|
|
|