aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r--net/sunrpc/cache.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 9afa4393c217..f3897d10f649 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -755,7 +755,7 @@ static ssize_t cache_read(struct file *filp, char __user *buf, size_t count,
755{ 755{
756 struct cache_reader *rp = filp->private_data; 756 struct cache_reader *rp = filp->private_data;
757 struct cache_request *rq; 757 struct cache_request *rq;
758 struct inode *inode = filp->f_path.dentry->d_inode; 758 struct inode *inode = file_inode(filp);
759 int err; 759 int err;
760 760
761 if (count == 0) 761 if (count == 0)
@@ -886,7 +886,7 @@ static ssize_t cache_write(struct file *filp, const char __user *buf,
886 struct cache_detail *cd) 886 struct cache_detail *cd)
887{ 887{
888 struct address_space *mapping = filp->f_mapping; 888 struct address_space *mapping = filp->f_mapping;
889 struct inode *inode = filp->f_path.dentry->d_inode; 889 struct inode *inode = file_inode(filp);
890 ssize_t ret = -EINVAL; 890 ssize_t ret = -EINVAL;
891 891
892 if (!cd->cache_parse) 892 if (!cd->cache_parse)
@@ -1454,7 +1454,7 @@ static ssize_t write_flush(struct file *file, const char __user *buf,
1454static ssize_t cache_read_procfs(struct file *filp, char __user *buf, 1454static ssize_t cache_read_procfs(struct file *filp, char __user *buf,
1455 size_t count, loff_t *ppos) 1455 size_t count, loff_t *ppos)
1456{ 1456{
1457 struct cache_detail *cd = PDE(filp->f_path.dentry->d_inode)->data; 1457 struct cache_detail *cd = PDE(file_inode(filp))->data;
1458 1458
1459 return cache_read(filp, buf, count, ppos, cd); 1459 return cache_read(filp, buf, count, ppos, cd);
1460} 1460}
@@ -1462,14 +1462,14 @@ static ssize_t cache_read_procfs(struct file *filp, char __user *buf,
1462static ssize_t cache_write_procfs(struct file *filp, const char __user *buf, 1462static ssize_t cache_write_procfs(struct file *filp, const char __user *buf,
1463 size_t count, loff_t *ppos) 1463 size_t count, loff_t *ppos)
1464{ 1464{
1465 struct cache_detail *cd = PDE(filp->f_path.dentry->d_inode)->data; 1465 struct cache_detail *cd = PDE(file_inode(filp))->data;
1466 1466
1467 return cache_write(filp, buf, count, ppos, cd); 1467 return cache_write(filp, buf, count, ppos, cd);
1468} 1468}
1469 1469
1470static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait) 1470static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait)
1471{ 1471{
1472 struct cache_detail *cd = PDE(filp->f_path.dentry->d_inode)->data; 1472 struct cache_detail *cd = PDE(file_inode(filp))->data;
1473 1473
1474 return cache_poll(filp, wait, cd); 1474 return cache_poll(filp, wait, cd);
1475} 1475}
@@ -1477,7 +1477,7 @@ static unsigned int cache_poll_procfs(struct file *filp, poll_table *wait)
1477static long cache_ioctl_procfs(struct file *filp, 1477static long cache_ioctl_procfs(struct file *filp,
1478 unsigned int cmd, unsigned long arg) 1478 unsigned int cmd, unsigned long arg)
1479{ 1479{
1480 struct inode *inode = filp->f_path.dentry->d_inode; 1480 struct inode *inode = file_inode(filp);
1481 struct cache_detail *cd = PDE(inode)->data; 1481 struct cache_detail *cd = PDE(inode)->data;
1482 1482
1483 return cache_ioctl(inode, filp, cmd, arg, cd); 1483 return cache_ioctl(inode, filp, cmd, arg, cd);
@@ -1546,7 +1546,7 @@ static int release_flush_procfs(struct inode *inode, struct file *filp)
1546static ssize_t read_flush_procfs(struct file *filp, char __user *buf, 1546static ssize_t read_flush_procfs(struct file *filp, char __user *buf,
1547 size_t count, loff_t *ppos) 1547 size_t count, loff_t *ppos)
1548{ 1548{
1549 struct cache_detail *cd = PDE(filp->f_path.dentry->d_inode)->data; 1549 struct cache_detail *cd = PDE(file_inode(filp))->data;
1550 1550
1551 return read_flush(filp, buf, count, ppos, cd); 1551 return read_flush(filp, buf, count, ppos, cd);
1552} 1552}
@@ -1555,7 +1555,7 @@ static ssize_t write_flush_procfs(struct file *filp,
1555 const char __user *buf, 1555 const char __user *buf,
1556 size_t count, loff_t *ppos) 1556 size_t count, loff_t *ppos)
1557{ 1557{
1558 struct cache_detail *cd = PDE(filp->f_path.dentry->d_inode)->data; 1558 struct cache_detail *cd = PDE(file_inode(filp))->data;
1559 1559
1560 return write_flush(filp, buf, count, ppos, cd); 1560 return write_flush(filp, buf, count, ppos, cd);
1561} 1561}
@@ -1686,7 +1686,7 @@ EXPORT_SYMBOL_GPL(cache_destroy_net);
1686static ssize_t cache_read_pipefs(struct file *filp, char __user *buf, 1686static ssize_t cache_read_pipefs(struct file *filp, char __user *buf,
1687 size_t count, loff_t *ppos) 1687 size_t count, loff_t *ppos)
1688{ 1688{
1689 struct cache_detail *cd = RPC_I(filp->f_path.dentry->d_inode)->private; 1689 struct cache_detail *cd = RPC_I(file_inode(filp))->private;
1690 1690
1691 return cache_read(filp, buf, count, ppos, cd); 1691 return cache_read(filp, buf, count, ppos, cd);
1692} 1692}
@@ -1694,14 +1694,14 @@ static ssize_t cache_read_pipefs(struct file *filp, char __user *buf,
1694static ssize_t cache_write_pipefs(struct file *filp, const char __user *buf, 1694static ssize_t cache_write_pipefs(struct file *filp, const char __user *buf,
1695 size_t count, loff_t *ppos) 1695 size_t count, loff_t *ppos)
1696{ 1696{
1697 struct cache_detail *cd = RPC_I(filp->f_path.dentry->d_inode)->private; 1697 struct cache_detail *cd = RPC_I(file_inode(filp))->private;
1698 1698
1699 return cache_write(filp, buf, count, ppos, cd); 1699 return cache_write(filp, buf, count, ppos, cd);
1700} 1700}
1701 1701
1702static unsigned int cache_poll_pipefs(struct file *filp, poll_table *wait) 1702static unsigned int cache_poll_pipefs(struct file *filp, poll_table *wait)
1703{ 1703{
1704 struct cache_detail *cd = RPC_I(filp->f_path.dentry->d_inode)->private; 1704 struct cache_detail *cd = RPC_I(file_inode(filp))->private;
1705 1705
1706 return cache_poll(filp, wait, cd); 1706 return cache_poll(filp, wait, cd);
1707} 1707}
@@ -1709,7 +1709,7 @@ static unsigned int cache_poll_pipefs(struct file *filp, poll_table *wait)
1709static long cache_ioctl_pipefs(struct file *filp, 1709static long cache_ioctl_pipefs(struct file *filp,
1710 unsigned int cmd, unsigned long arg) 1710 unsigned int cmd, unsigned long arg)
1711{ 1711{
1712 struct inode *inode = filp->f_dentry->d_inode; 1712 struct inode *inode = file_inode(filp);
1713 struct cache_detail *cd = RPC_I(inode)->private; 1713 struct cache_detail *cd = RPC_I(inode)->private;
1714 1714
1715 return cache_ioctl(inode, filp, cmd, arg, cd); 1715 return cache_ioctl(inode, filp, cmd, arg, cd);
@@ -1778,7 +1778,7 @@ static int release_flush_pipefs(struct inode *inode, struct file *filp)
1778static ssize_t read_flush_pipefs(struct file *filp, char __user *buf, 1778static ssize_t read_flush_pipefs(struct file *filp, char __user *buf,
1779 size_t count, loff_t *ppos) 1779 size_t count, loff_t *ppos)
1780{ 1780{
1781 struct cache_detail *cd = RPC_I(filp->f_path.dentry->d_inode)->private; 1781 struct cache_detail *cd = RPC_I(file_inode(filp))->private;
1782 1782
1783 return read_flush(filp, buf, count, ppos, cd); 1783 return read_flush(filp, buf, count, ppos, cd);
1784} 1784}
@@ -1787,7 +1787,7 @@ static ssize_t write_flush_pipefs(struct file *filp,
1787 const char __user *buf, 1787 const char __user *buf,
1788 size_t count, loff_t *ppos) 1788 size_t count, loff_t *ppos)
1789{ 1789{
1790 struct cache_detail *cd = RPC_I(filp->f_path.dentry->d_inode)->private; 1790 struct cache_detail *cd = RPC_I(file_inode(filp))->private;
1791 1791
1792 return write_flush(filp, buf, count, ppos, cd); 1792 return write_flush(filp, buf, count, ppos, cd);
1793} 1793}