summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-22 14:20:48 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-22 14:20:48 -0800
commitfe35d4a0289a8d6efcacb57e9a377b845686df10 (patch)
tree05ff26e6658d3ddc6e4885059bbf018b1681bb3b /kernel
parent9917f7bbe96432012d3ad8075e9fd99390255d0c (diff)
parent28ba0ec64ca0f6ad2b0338ccec0b00a4e64e7a69 (diff)
downloadop-kernel-dev-fe35d4a0289a8d6efcacb57e9a377b845686df10.zip
op-kernel-dev-fe35d4a0289a8d6efcacb57e9a377b845686df10.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: jfs: Fix 32bit build warning Remove obsolete comment in fs.h Sanitize f_flags helpers Fix f_flags/f_mode in case of lookup_instantiate_filp() from open(pathname, 3) anonfd: Allow making anon files read-only fs/compat_ioctl.c: fix build error when !BLOCK pohmelfs needs I_LOCK alloc_file(): simplify handling of mnt_clone_write() errors
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c1
-rw-r--r--kernel/perf_event.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 267e484..fc0f928 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -250,7 +250,6 @@ struct audit_context {
#endif
};
-#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
static inline int open_arg(int flags, int mask)
{
int n = ACC_MODE(flags);
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index e0eb4a2..1f38270 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4724,7 +4724,7 @@ SYSCALL_DEFINE5(perf_event_open,
if (IS_ERR(event))
goto err_put_context;
- err = anon_inode_getfd("[perf_event]", &perf_fops, event, 0);
+ err = anon_inode_getfd("[perf_event]", &perf_fops, event, O_RDWR);
if (err < 0)
goto err_free_put_context;
OpenPOWER on IntegriCloud