diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 7 | ||||
-rw-r--r-- | fs/ramfs/file-mmu.c | 4 | ||||
-rw-r--r-- | fs/ramfs/file-nommu.c | 4 |
3 files changed, 9 insertions, 6 deletions
@@ -599,9 +599,6 @@ static void use_mm(struct mm_struct *mm) | |||
599 | * by the calling kernel thread | 599 | * by the calling kernel thread |
600 | * (Note: this routine is intended to be called only | 600 | * (Note: this routine is intended to be called only |
601 | * from a kernel thread context) | 601 | * from a kernel thread context) |
602 | * | ||
603 | * Comments: Called with ctx->ctx_lock held. This nests | ||
604 | * task_lock instead ctx_lock. | ||
605 | */ | 602 | */ |
606 | static void unuse_mm(struct mm_struct *mm) | 603 | static void unuse_mm(struct mm_struct *mm) |
607 | { | 604 | { |
@@ -850,14 +847,16 @@ static void aio_kick_handler(struct work_struct *work) | |||
850 | { | 847 | { |
851 | struct kioctx *ctx = container_of(work, struct kioctx, wq.work); | 848 | struct kioctx *ctx = container_of(work, struct kioctx, wq.work); |
852 | mm_segment_t oldfs = get_fs(); | 849 | mm_segment_t oldfs = get_fs(); |
850 | struct mm_struct *mm; | ||
853 | int requeue; | 851 | int requeue; |
854 | 852 | ||
855 | set_fs(USER_DS); | 853 | set_fs(USER_DS); |
856 | use_mm(ctx->mm); | 854 | use_mm(ctx->mm); |
857 | spin_lock_irq(&ctx->ctx_lock); | 855 | spin_lock_irq(&ctx->ctx_lock); |
858 | requeue =__aio_run_iocbs(ctx); | 856 | requeue =__aio_run_iocbs(ctx); |
859 | unuse_mm(ctx->mm); | 857 | mm = ctx->mm; |
860 | spin_unlock_irq(&ctx->ctx_lock); | 858 | spin_unlock_irq(&ctx->ctx_lock); |
859 | unuse_mm(mm); | ||
861 | set_fs(oldfs); | 860 | set_fs(oldfs); |
862 | /* | 861 | /* |
863 | * we're in a worker thread already, don't use queue_delayed_work, | 862 | * we're in a worker thread already, don't use queue_delayed_work, |
diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c index 0947fb57dcf3..54ebbc84207f 100644 --- a/fs/ramfs/file-mmu.c +++ b/fs/ramfs/file-mmu.c | |||
@@ -25,11 +25,13 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/mm.h> | ||
28 | 29 | ||
29 | const struct address_space_operations ramfs_aops = { | 30 | const struct address_space_operations ramfs_aops = { |
30 | .readpage = simple_readpage, | 31 | .readpage = simple_readpage, |
31 | .prepare_write = simple_prepare_write, | 32 | .prepare_write = simple_prepare_write, |
32 | .commit_write = simple_commit_write | 33 | .commit_write = simple_commit_write, |
34 | .set_page_dirty = __set_page_dirty_nobuffers, | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | const struct file_operations ramfs_file_operations = { | 37 | const struct file_operations ramfs_file_operations = { |
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 61cbe1ef06b9..e9d6c4733282 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/mm.h> | ||
14 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
15 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -30,7 +31,8 @@ static int ramfs_nommu_setattr(struct dentry *, struct iattr *); | |||
30 | const struct address_space_operations ramfs_aops = { | 31 | const struct address_space_operations ramfs_aops = { |
31 | .readpage = simple_readpage, | 32 | .readpage = simple_readpage, |
32 | .prepare_write = simple_prepare_write, | 33 | .prepare_write = simple_prepare_write, |
33 | .commit_write = simple_commit_write | 34 | .commit_write = simple_commit_write, |
35 | .set_page_dirty = __set_page_dirty_nobuffers, | ||
34 | }; | 36 | }; |
35 | 37 | ||
36 | const struct file_operations ramfs_file_operations = { | 38 | const struct file_operations ramfs_file_operations = { |