diff options
author | John W. Linville | 2012-02-15 22:24:37 +0100 |
---|---|---|
committer | John W. Linville | 2012-02-15 22:24:37 +0100 |
commit | ca994a36f585432458ead9133fcfe05440edbb7b (patch) | |
tree | be05512153a9cd5cbe1f1234bc09fd9cd388ec58 /fs/ioprio.c | |
parent | rtlwifi: Modify rtl_pci_init to return 0 on success (diff) | |
parent | ath9k: stop on rates with idx -1 in ath9k rate control's .tx_status (diff) | |
download | kernel-qcow2-linux-ca994a36f585432458ead9133fcfe05440edbb7b.tar.gz kernel-qcow2-linux-ca994a36f585432458ead9133fcfe05440edbb7b.tar.xz kernel-qcow2-linux-ca994a36f585432458ead9133fcfe05440edbb7b.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
net/mac80211/debugfs_sta.c
net/mac80211/sta_info.h
Diffstat (limited to 'fs/ioprio.c')
-rw-r--r-- | fs/ioprio.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c index f79dab83e17b..f84b380d65e5 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c @@ -48,28 +48,12 @@ int set_task_ioprio(struct task_struct *task, int ioprio) if (err) return err; - task_lock(task); - do { - ioc = task->io_context; - /* see wmb() in current_io_context() */ - smp_read_barrier_depends(); - if (ioc) - break; - - ioc = alloc_io_context(GFP_ATOMIC, -1); - if (!ioc) { - err = -ENOMEM; - break; - } - task->io_context = ioc; - } while (1); - - if (!err) { - ioc->ioprio = ioprio; - ioc->ioprio_changed = 1; + ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE); + if (ioc) { + ioc_ioprio_changed(ioc, ioprio); + put_io_context(ioc, NULL); } - task_unlock(task); return err; } EXPORT_SYMBOL_GPL(set_task_ioprio); |