diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 08:41:41 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 13:07:53 -0400 |
| commit | 816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch) | |
| tree | 421fa29aedff988e392f92780637553e275d37a0 /fs/ioprio.c | |
| parent | 70ac4385a13f78bc478f26d317511893741b05bd (diff) | |
| parent | d384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
fs/nfs/inode.c
fs/super.c
Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch
'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'fs/ioprio.c')
| -rw-r--r-- | fs/ioprio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c index ca77008146c0..7fa76ed53c10 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c | |||
| @@ -24,15 +24,21 @@ | |||
| 24 | #include <linux/blkdev.h> | 24 | #include <linux/blkdev.h> |
| 25 | #include <linux/capability.h> | 25 | #include <linux/capability.h> |
| 26 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
| 27 | #include <linux/security.h> | ||
| 27 | 28 | ||
| 28 | static int set_task_ioprio(struct task_struct *task, int ioprio) | 29 | static int set_task_ioprio(struct task_struct *task, int ioprio) |
| 29 | { | 30 | { |
| 31 | int err; | ||
| 30 | struct io_context *ioc; | 32 | struct io_context *ioc; |
| 31 | 33 | ||
| 32 | if (task->uid != current->euid && | 34 | if (task->uid != current->euid && |
| 33 | task->uid != current->uid && !capable(CAP_SYS_NICE)) | 35 | task->uid != current->uid && !capable(CAP_SYS_NICE)) |
| 34 | return -EPERM; | 36 | return -EPERM; |
| 35 | 37 | ||
| 38 | err = security_task_setioprio(task, ioprio); | ||
| 39 | if (err) | ||
| 40 | return err; | ||
| 41 | |||
| 36 | task_lock(task); | 42 | task_lock(task); |
| 37 | 43 | ||
| 38 | task->ioprio = ioprio; | 44 | task->ioprio = ioprio; |
