summaryrefslogtreecommitdiffstats
path: root/fs/afs/file.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-11-07 00:59:46 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:41 -0800
commita463ddd343dacf5f1badae514ed2c5135ec0c3a9 (patch)
tree685d7416610c518020960e0f69584b2a21453ded /fs/afs/file.c
parentdc487002a26a5733967292356434e61dc5da9c98 (diff)
downloadblackbird-op-linux-a463ddd343dacf5f1badae514ed2c5135ec0c3a9.tar.gz
blackbird-op-linux-a463ddd343dacf5f1badae514ed2c5135ec0c3a9.zip
[PATCH] afs: use generic_ro_fops
afs actually had a write method that returned different errors depending on whether some flag was set - better return the standard EINVAL errno. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/afs/file.c')
-rw-r--r--fs/afs/file.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 4975c9c193dd..f53971a543b2 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -31,24 +31,10 @@ static int afs_file_readpage(struct file *file, struct page *page);
static int afs_file_invalidatepage(struct page *page, unsigned long offset);
static int afs_file_releasepage(struct page *page, gfp_t gfp_flags);
-static ssize_t afs_file_write(struct file *file, const char __user *buf,
- size_t size, loff_t *off);
-
struct inode_operations afs_file_inode_operations = {
.getattr = afs_inode_getattr,
};
-struct file_operations afs_file_file_operations = {
- .read = generic_file_read,
- .write = afs_file_write,
- .mmap = generic_file_mmap,
-#if 0
- .open = afs_file_open,
- .release = afs_file_release,
- .fsync = afs_file_fsync,
-#endif
-};
-
struct address_space_operations afs_fs_aops = {
.readpage = afs_file_readpage,
.sync_page = block_sync_page,
@@ -59,22 +45,6 @@ struct address_space_operations afs_fs_aops = {
/*****************************************************************************/
/*
- * AFS file write
- */
-static ssize_t afs_file_write(struct file *file, const char __user *buf,
- size_t size, loff_t *off)
-{
- struct afs_vnode *vnode;
-
- vnode = AFS_FS_I(file->f_dentry->d_inode);
- if (vnode->flags & AFS_VNODE_DELETED)
- return -ESTALE;
-
- return -EIO;
-} /* end afs_file_write() */
-
-/*****************************************************************************/
-/*
* deal with notification that a page was read from the cache
*/
#ifdef AFS_CACHING_SUPPORT
OpenPOWER on IntegriCloud