aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index e51558fca3a3..11b57c2c8f15 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -393,7 +393,7 @@ more:
393static ssize_t ceph_sync_read(struct file *file, char __user *data, 393static ssize_t ceph_sync_read(struct file *file, char __user *data,
394 unsigned len, loff_t *poff, int *checkeof) 394 unsigned len, loff_t *poff, int *checkeof)
395{ 395{
396 struct inode *inode = file->f_dentry->d_inode; 396 struct inode *inode = file_inode(file);
397 struct page **pages; 397 struct page **pages;
398 u64 off = *poff; 398 u64 off = *poff;
399 int num_pages, ret; 399 int num_pages, ret;
@@ -466,7 +466,7 @@ static void sync_write_commit(struct ceph_osd_request *req,
466static ssize_t ceph_sync_write(struct file *file, const char __user *data, 466static ssize_t ceph_sync_write(struct file *file, const char __user *data,
467 size_t left, loff_t *offset) 467 size_t left, loff_t *offset)
468{ 468{
469 struct inode *inode = file->f_dentry->d_inode; 469 struct inode *inode = file_inode(file);
470 struct ceph_inode_info *ci = ceph_inode(inode); 470 struct ceph_inode_info *ci = ceph_inode(inode);
471 struct ceph_fs_client *fsc = ceph_inode_to_client(inode); 471 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
472 struct ceph_osd_request *req; 472 struct ceph_osd_request *req;
@@ -483,7 +483,7 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
483 int ret; 483 int ret;
484 struct timespec mtime = CURRENT_TIME; 484 struct timespec mtime = CURRENT_TIME;
485 485
486 if (ceph_snap(file->f_dentry->d_inode) != CEPH_NOSNAP) 486 if (ceph_snap(file_inode(file)) != CEPH_NOSNAP)
487 return -EROFS; 487 return -EROFS;
488 488
489 dout("sync_write on file %p %lld~%u %s\n", file, *offset, 489 dout("sync_write on file %p %lld~%u %s\n", file, *offset,
@@ -637,7 +637,7 @@ static ssize_t ceph_aio_read(struct kiocb *iocb, const struct iovec *iov,
637 struct ceph_file_info *fi = filp->private_data; 637 struct ceph_file_info *fi = filp->private_data;
638 loff_t *ppos = &iocb->ki_pos; 638 loff_t *ppos = &iocb->ki_pos;
639 size_t len = iov->iov_len; 639 size_t len = iov->iov_len;
640 struct inode *inode = filp->f_dentry->d_inode; 640 struct inode *inode = file_inode(filp);
641 struct ceph_inode_info *ci = ceph_inode(inode); 641 struct ceph_inode_info *ci = ceph_inode(inode);
642 void __user *base = iov->iov_base; 642 void __user *base = iov->iov_base;
643 ssize_t ret; 643 ssize_t ret;
@@ -707,7 +707,7 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
707{ 707{
708 struct file *file = iocb->ki_filp; 708 struct file *file = iocb->ki_filp;
709 struct ceph_file_info *fi = file->private_data; 709 struct ceph_file_info *fi = file->private_data;
710 struct inode *inode = file->f_dentry->d_inode; 710 struct inode *inode = file_inode(file);
711 struct ceph_inode_info *ci = ceph_inode(inode); 711 struct ceph_inode_info *ci = ceph_inode(inode);
712 struct ceph_osd_client *osdc = 712 struct ceph_osd_client *osdc =
713 &ceph_sb_to_client(inode->i_sb)->client->osdc; 713 &ceph_sb_to_client(inode->i_sb)->client->osdc;