Merge branch 'for-linus-for-3.6-rc1' of git://git.linaro.org/people/mszyprowski/linux...
[cascardo/linux.git] / fs / cachefiles / rdwr.c
index 0e3c092..c0353df 100644 (file)
@@ -891,6 +891,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
        struct cachefiles_cache *cache;
        mm_segment_t old_fs;
        struct file *file;
+       struct path path;
        loff_t pos, eof;
        size_t len;
        void *data;
@@ -916,10 +917,9 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
 
        /* write the page to the backing filesystem and let it store it in its
         * own time */
-       dget(object->backer);
-       mntget(cache->mnt);
-       file = dentry_open(object->backer, cache->mnt, O_RDWR,
-                          cache->cache_cred);
+       path.mnt = cache->mnt;
+       path.dentry = object->backer;
+       file = dentry_open(&path, O_RDWR, cache->cache_cred);
        if (IS_ERR(file)) {
                ret = PTR_ERR(file);
        } else {