X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsunrpc%2Fcache.c;h=bb54be85152326ff4d840810090e63d1fa3605bf;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=e84acd07f82286f79d107e229bed6cd877eb594a;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index e84acd07f..bb54be851 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, };