diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-06-01 15:41:23 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-06-01 15:41:23 -0400 |
commit | 273d81d6ada951ba99f10b755d6f849dbb352730 (patch) | |
tree | cfb22593741e71b5f311c4180c542d63f7bcc4df /fs/cifs/file.c | |
parent | 3856a9d443ee24248683c415e535f7a2b0fed0f3 (diff) |
[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 379369ecda96..d62e29fe91f2 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1959,3 +1959,19 @@ struct address_space_operations cifs_addr_ops = { | |||
1959 | /* .sync_page = cifs_sync_page, */ | 1959 | /* .sync_page = cifs_sync_page, */ |
1960 | /* .direct_IO = */ | 1960 | /* .direct_IO = */ |
1961 | }; | 1961 | }; |
1962 | |||
1963 | /* | ||
1964 | * cifs_readpages requires the server to support a buffer large enough to | ||
1965 | * contain the header plus one complete page of data. Otherwise, we need | ||
1966 | * to leave cifs_readpages out of the address space operations. | ||
1967 | */ | ||
1968 | struct address_space_operations cifs_addr_ops_smallbuf = { | ||
1969 | .readpage = cifs_readpage, | ||
1970 | .writepage = cifs_writepage, | ||
1971 | .writepages = cifs_writepages, | ||
1972 | .prepare_write = cifs_prepare_write, | ||
1973 | .commit_write = cifs_commit_write, | ||
1974 | .set_page_dirty = __set_page_dirty_nobuffers, | ||
1975 | /* .sync_page = cifs_sync_page, */ | ||
1976 | /* .direct_IO = */ | ||
1977 | }; | ||