aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-07 05:08:24 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-07 05:08:24 -0700
commitde75755875178ddb7adc02cb5d62f8c497dbe8e2 (patch)
treee095dd288b85d1139abc9003060a7996f4891083 /net
parent2eca58ca8c8f4afa5ea92bdf09f96165cc2d3885 (diff)
downloadhistory-de75755875178ddb7adc02cb5d62f8c497dbe8e2.tar.gz
Mark the sunrpc cache control file nonseekable, and
remove the run-time tests for it.
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/cache.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index e84acd07f82286..bb54be85152326 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -582,9 +582,6 @@ cache_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
struct cache_detail *cd = PDE(filp->f_dentry->d_inode)->data;
int err;
- if (ppos != &filp->f_pos)
- return -ESPIPE;
-
if (count == 0)
return 0;
@@ -662,9 +659,6 @@ cache_write(struct file *filp, const char __user *buf, size_t count,
int err;
struct cache_detail *cd = PDE(filp->f_dentry->d_inode)->data;
- if (ppos != &filp->f_pos)
- return -ESPIPE;
-
if (count == 0)
return 0;
if (count >= sizeof(write_buf))
@@ -751,6 +745,7 @@ cache_open(struct inode *inode, struct file *filp)
{
struct cache_reader *rp = NULL;
+ nonseekable_open(inode, filp);
if (filp->f_mode & FMODE_READ) {
struct cache_detail *cd = PDE(inode)->data;
@@ -1212,6 +1207,7 @@ static ssize_t write_flush(struct file * file, const char __user * buf,
}
static struct file_operations cache_flush_operations = {
+ .open = nonseekable_open,
.read = read_flush,
.write = write_flush,
};