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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index 0e3c0924cc3a..c0353dfac51f 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -891,6 +891,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
891 struct cachefiles_cache *cache; 891 struct cachefiles_cache *cache;
892 mm_segment_t old_fs; 892 mm_segment_t old_fs;
893 struct file *file; 893 struct file *file;
894 struct path path;
894 loff_t pos, eof; 895 loff_t pos, eof;
895 size_t len; 896 size_t len;
896 void *data; 897 void *data;
@@ -916,10 +917,9 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
916 917
917 /* write the page to the backing filesystem and let it store it in its 918 /* write the page to the backing filesystem and let it store it in its
918 * own time */ 919 * own time */
919 dget(object->backer); 920 path.mnt = cache->mnt;
920 mntget(cache->mnt); 921 path.dentry = object->backer;
921 file = dentry_open(object->backer, cache->mnt, O_RDWR, 922 file = dentry_open(&path, O_RDWR, cache->cache_cred);
922 cache->cache_cred);
923 if (IS_ERR(file)) { 923 if (IS_ERR(file)) {
924 ret = PTR_ERR(file); 924 ret = PTR_ERR(file);
925 } else { 925 } else {