diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-26 13:58:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-22 16:01:29 -0400 |
commit | 765927b2d508712d320c8934db963bbe14c3fcec (patch) | |
tree | 97acdb14fae285764def396c4ed01d4d5c93e76a /fs/cachefiles | |
parent | bf349a447059656ebe63fb4fd1ccb27ac1da22ad (diff) |
switch dentry_open() to struct path, make it grab references itself
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cachefiles')
-rw-r--r-- | fs/cachefiles/rdwr.c | 8 |
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 { |