aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/rdwr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cachefiles/rdwr.c')
-rw-r--r--fs/cachefiles/rdwr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index 480992259707..317f9ee9c991 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -962,12 +962,14 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
962 } 962 }
963 963
964 data = kmap(page); 964 data = kmap(page);
965 file_start_write(file);
965 old_fs = get_fs(); 966 old_fs = get_fs();
966 set_fs(KERNEL_DS); 967 set_fs(KERNEL_DS);
967 ret = file->f_op->write( 968 ret = file->f_op->write(
968 file, (const void __user *) data, len, &pos); 969 file, (const void __user *) data, len, &pos);
969 set_fs(old_fs); 970 set_fs(old_fs);
970 kunmap(page); 971 kunmap(page);
972 file_end_write(file);
971 if (ret != len) 973 if (ret != len)
972 ret = -EIO; 974 ret = -EIO;
973 } 975 }