aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs/file.c')
-rw-r--r--fs/afs/file.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 4975c9c193dd..150b19227922 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);
31static int afs_file_invalidatepage(struct page *page, unsigned long offset); 31static int afs_file_invalidatepage(struct page *page, unsigned long offset);
32static int afs_file_releasepage(struct page *page, gfp_t gfp_flags); 32static int afs_file_releasepage(struct page *page, gfp_t gfp_flags);
33 33
34static ssize_t afs_file_write(struct file *file, const char __user *buf,
35 size_t size, loff_t *off);
36
37struct inode_operations afs_file_inode_operations = { 34struct inode_operations afs_file_inode_operations = {
38 .getattr = afs_inode_getattr, 35 .getattr = afs_inode_getattr,
39}; 36};
40 37
41struct file_operations afs_file_file_operations = {
42 .read = generic_file_read,
43 .write = afs_file_write,
44 .mmap = generic_file_mmap,
45#if 0
46 .open = afs_file_open,
47 .release = afs_file_release,
48 .fsync = afs_file_fsync,
49#endif
50};
51
52struct address_space_operations afs_fs_aops = { 38struct address_space_operations afs_fs_aops = {
53 .readpage = afs_file_readpage, 39 .readpage = afs_file_readpage,
54 .sync_page = block_sync_page, 40 .sync_page = block_sync_page,
@@ -59,22 +45,6 @@ struct address_space_operations afs_fs_aops = {
59 45
60/*****************************************************************************/ 46/*****************************************************************************/
61/* 47/*
62 * AFS file write
63 */
64static ssize_t afs_file_write(struct file *file, const char __user *buf,
65 size_t size, loff_t *off)
66{
67 struct afs_vnode *vnode;
68
69 vnode = AFS_FS_I(file->f_dentry->d_inode);
70 if (vnode->flags & AFS_VNODE_DELETED)
71 return -ESTALE;
72
73 return -EIO;
74} /* end afs_file_write() */
75
76/*****************************************************************************/
77/*
78 * deal with notification that a page was read from the cache 48 * deal with notification that a page was read from the cache
79 */ 49 */
80#ifdef AFS_CACHING_SUPPORT 50#ifdef AFS_CACHING_SUPPORT
@@ -295,8 +265,7 @@ static int afs_file_releasepage(struct page *page, gfp_t gfp_flags)
295 set_page_private(page, 0); 265 set_page_private(page, 0);
296 ClearPagePrivate(page); 266 ClearPagePrivate(page);
297 267
298 if (pageio) 268 kfree(pageio);
299 kfree(pageio);
300 } 269 }
301 270
302 _leave(" = 0"); 271 _leave(" = 0");