diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-06-01 19:41:23 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-06-01 19:41:23 +0000 |
commit | 273d81d6ada951ba99f10b755d6f849dbb352730 (patch) | |
tree | cfb22593741e71b5f311c4180c542d63f7bcc4df /fs/cifs/file.c | |
parent | 3856a9d443ee24248683c415e535f7a2b0fed0f3 (diff) | |
download | op-kernel-dev-273d81d6ada951ba99f10b755d6f849dbb352730.zip op-kernel-dev-273d81d6ada951ba99f10b755d6f849dbb352730.tar.gz |
[CIFS] Do not overwrite aops
cifs should not be overwriting an element of the aops structure, since the
structure is shared by all cifs inodes. Instead define a separate aops
structure to suit each purpose.
I also took the liberty of replacing a hard-coded 4096 with PAGE_CACHE_SIZE
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 379369e..d62e29f 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1959,3 +1959,19 @@ struct address_space_operations cifs_addr_ops = { /* .sync_page = cifs_sync_page, */ /* .direct_IO = */ }; + +/* + * cifs_readpages requires the server to support a buffer large enough to + * contain the header plus one complete page of data. Otherwise, we need + * to leave cifs_readpages out of the address space operations. + */ +struct address_space_operations cifs_addr_ops_smallbuf = { + .readpage = cifs_readpage, + .writepage = cifs_writepage, + .writepages = cifs_writepages, + .prepare_write = cifs_prepare_write, + .commit_write = cifs_commit_write, + .set_page_dirty = __set_page_dirty_nobuffers, + /* .sync_page = cifs_sync_page, */ + /* .direct_IO = */ +}; |