diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-08 01:47:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 01:47:47 -0400 |
commit | 93022136fff9e6130aa128a5ed8a599e93ac813c (patch) | |
tree | 185390fb75a3d7423cc508610b76637c957205b9 /ipc/shm.c | |
parent | c49c412a47b5102516d3313d4eba38cb1e968721 (diff) | |
parent | b7279469d66b55119784b8b9529c99c1955fe747 (diff) |
Merge commit 'v2.6.26-rc9' into x86/cpu
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -894,8 +894,6 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) | |||
894 | if (!sfd) | 894 | if (!sfd) |
895 | goto out_put_dentry; | 895 | goto out_put_dentry; |
896 | 896 | ||
897 | err = -ENOMEM; | ||
898 | |||
899 | file = alloc_file(path.mnt, path.dentry, f_mode, &shm_file_operations); | 897 | file = alloc_file(path.mnt, path.dentry, f_mode, &shm_file_operations); |
900 | if (!file) | 898 | if (!file) |
901 | goto out_free; | 899 | goto out_free; |
@@ -1060,16 +1058,16 @@ asmlinkage long sys_shmdt(char __user *shmaddr) | |||
1060 | static int sysvipc_shm_proc_show(struct seq_file *s, void *it) | 1058 | static int sysvipc_shm_proc_show(struct seq_file *s, void *it) |
1061 | { | 1059 | { |
1062 | struct shmid_kernel *shp = it; | 1060 | struct shmid_kernel *shp = it; |
1063 | char *format; | ||
1064 | 1061 | ||
1065 | #define SMALL_STRING "%10d %10d %4o %10u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" | 1062 | #if BITS_PER_LONG <= 32 |
1066 | #define BIG_STRING "%10d %10d %4o %21u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" | 1063 | #define SIZE_SPEC "%10lu" |
1064 | #else | ||
1065 | #define SIZE_SPEC "%21lu" | ||
1066 | #endif | ||
1067 | 1067 | ||
1068 | if (sizeof(size_t) <= sizeof(int)) | 1068 | return seq_printf(s, |
1069 | format = SMALL_STRING; | 1069 | "%10d %10d %4o " SIZE_SPEC " %5u %5u " |
1070 | else | 1070 | "%5lu %5u %5u %5u %5u %10lu %10lu %10lu\n", |
1071 | format = BIG_STRING; | ||
1072 | return seq_printf(s, format, | ||
1073 | shp->shm_perm.key, | 1071 | shp->shm_perm.key, |
1074 | shp->shm_perm.id, | 1072 | shp->shm_perm.id, |
1075 | shp->shm_perm.mode, | 1073 | shp->shm_perm.mode, |