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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index c6cd8d7a4eef..3cbb0e834694 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -74,12 +74,12 @@ static int cachefiles_read_waiter(wait_queue_t *wait, unsigned mode,
74static int cachefiles_read_reissue(struct cachefiles_object *object, 74static int cachefiles_read_reissue(struct cachefiles_object *object,
75 struct cachefiles_one_read *monitor) 75 struct cachefiles_one_read *monitor)
76{ 76{
77 struct address_space *bmapping = object->backer->d_inode->i_mapping; 77 struct address_space *bmapping = d_backing_inode(object->backer)->i_mapping;
78 struct page *backpage = monitor->back_page, *backpage2; 78 struct page *backpage = monitor->back_page, *backpage2;
79 int ret; 79 int ret;
80 80
81 _enter("{ino=%lx},{%lx,%lx}", 81 _enter("{ino=%lx},{%lx,%lx}",
82 object->backer->d_inode->i_ino, 82 d_backing_inode(object->backer)->i_ino,
83 backpage->index, backpage->flags); 83 backpage->index, backpage->flags);
84 84
85 /* skip if the page was truncated away completely */ 85 /* skip if the page was truncated away completely */
@@ -157,7 +157,7 @@ static void cachefiles_read_copier(struct fscache_operation *_op)
157 object = container_of(op->op.object, 157 object = container_of(op->op.object,
158 struct cachefiles_object, fscache); 158 struct cachefiles_object, fscache);
159 159
160 _enter("{ino=%lu}", object->backer->d_inode->i_ino); 160 _enter("{ino=%lu}", d_backing_inode(object->backer)->i_ino);
161 161
162 max = 8; 162 max = 8;
163 spin_lock_irq(&object->work_lock); 163 spin_lock_irq(&object->work_lock);
@@ -247,7 +247,7 @@ static int cachefiles_read_backing_file_one(struct cachefiles_object *object,
247 init_waitqueue_func_entry(&monitor->monitor, cachefiles_read_waiter); 247 init_waitqueue_func_entry(&monitor->monitor, cachefiles_read_waiter);
248 248
249 /* attempt to get hold of the backing page */ 249 /* attempt to get hold of the backing page */
250 bmapping = object->backer->d_inode->i_mapping; 250 bmapping = d_backing_inode(object->backer)->i_mapping;
251 newpage = NULL; 251 newpage = NULL;
252 252
253 for (;;) { 253 for (;;) {
@@ -408,7 +408,7 @@ int cachefiles_read_or_alloc_page(struct fscache_retrieval *op,
408 if (!object->backer) 408 if (!object->backer)
409 goto enobufs; 409 goto enobufs;
410 410
411 inode = object->backer->d_inode; 411 inode = d_backing_inode(object->backer);
412 ASSERT(S_ISREG(inode->i_mode)); 412 ASSERT(S_ISREG(inode->i_mode));
413 ASSERT(inode->i_mapping->a_ops->bmap); 413 ASSERT(inode->i_mapping->a_ops->bmap);
414 ASSERT(inode->i_mapping->a_ops->readpages); 414 ASSERT(inode->i_mapping->a_ops->readpages);
@@ -468,7 +468,7 @@ static int cachefiles_read_backing_file(struct cachefiles_object *object,
468 struct list_head *list) 468 struct list_head *list)
469{ 469{
470 struct cachefiles_one_read *monitor = NULL; 470 struct cachefiles_one_read *monitor = NULL;
471 struct address_space *bmapping = object->backer->d_inode->i_mapping; 471 struct address_space *bmapping = d_backing_inode(object->backer)->i_mapping;
472 struct page *newpage = NULL, *netpage, *_n, *backpage = NULL; 472 struct page *newpage = NULL, *netpage, *_n, *backpage = NULL;
473 int ret = 0; 473 int ret = 0;
474 474
@@ -705,7 +705,7 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op,
705 if (cachefiles_has_space(cache, 0, *nr_pages) < 0) 705 if (cachefiles_has_space(cache, 0, *nr_pages) < 0)
706 space = 0; 706 space = 0;
707 707
708 inode = object->backer->d_inode; 708 inode = d_backing_inode(object->backer);
709 ASSERT(S_ISREG(inode->i_mode)); 709 ASSERT(S_ISREG(inode->i_mode));
710 ASSERT(inode->i_mapping->a_ops->bmap); 710 ASSERT(inode->i_mapping->a_ops->bmap);
711 ASSERT(inode->i_mapping->a_ops->readpages); 711 ASSERT(inode->i_mapping->a_ops->readpages);