diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/qnx4/inode.c | 27 | ||||
-rw-r--r-- | fs/qnx4/namei.c | 4 |
2 files changed, 0 insertions, 31 deletions
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index db18d866d981..14a0ba0f0c1c 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -286,44 +286,17 @@ static void qnx4_put_super(struct super_block *sb) | |||
286 | return; | 286 | return; |
287 | } | 287 | } |
288 | 288 | ||
289 | static int qnx4_writepage(struct page *page, struct writeback_control *wbc) | ||
290 | { | ||
291 | return block_write_full_page(page,qnx4_get_block, wbc); | ||
292 | } | ||
293 | |||
294 | static int qnx4_readpage(struct file *file, struct page *page) | 289 | static int qnx4_readpage(struct file *file, struct page *page) |
295 | { | 290 | { |
296 | return block_read_full_page(page,qnx4_get_block); | 291 | return block_read_full_page(page,qnx4_get_block); |
297 | } | 292 | } |
298 | 293 | ||
299 | static int qnx4_write_begin(struct file *file, struct address_space *mapping, | ||
300 | loff_t pos, unsigned len, unsigned flags, | ||
301 | struct page **pagep, void **fsdata) | ||
302 | { | ||
303 | struct qnx4_inode_info *qnx4_inode = qnx4_i(mapping->host); | ||
304 | int ret; | ||
305 | |||
306 | *pagep = NULL; | ||
307 | ret = cont_write_begin(file, mapping, pos, len, flags, pagep, fsdata, | ||
308 | qnx4_get_block, | ||
309 | &qnx4_inode->mmu_private); | ||
310 | if (unlikely(ret)) { | ||
311 | loff_t isize = mapping->host->i_size; | ||
312 | if (pos + len > isize) | ||
313 | vmtruncate(mapping->host, isize); | ||
314 | } | ||
315 | |||
316 | return ret; | ||
317 | } | ||
318 | static sector_t qnx4_bmap(struct address_space *mapping, sector_t block) | 294 | static sector_t qnx4_bmap(struct address_space *mapping, sector_t block) |
319 | { | 295 | { |
320 | return generic_block_bmap(mapping,block,qnx4_get_block); | 296 | return generic_block_bmap(mapping,block,qnx4_get_block); |
321 | } | 297 | } |
322 | static const struct address_space_operations qnx4_aops = { | 298 | static const struct address_space_operations qnx4_aops = { |
323 | .readpage = qnx4_readpage, | 299 | .readpage = qnx4_readpage, |
324 | .writepage = qnx4_writepage, | ||
325 | .write_begin = qnx4_write_begin, | ||
326 | .write_end = generic_write_end, | ||
327 | .bmap = qnx4_bmap | 300 | .bmap = qnx4_bmap |
328 | }; | 301 | }; |
329 | 302 | ||
diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c index 275327b5615e..e8eb8784ed30 100644 --- a/fs/qnx4/namei.c +++ b/fs/qnx4/namei.c | |||
@@ -39,10 +39,6 @@ static int qnx4_match(int len, const char *name, | |||
39 | } else { | 39 | } else { |
40 | namelen = QNX4_SHORT_NAME_MAX; | 40 | namelen = QNX4_SHORT_NAME_MAX; |
41 | } | 41 | } |
42 | /* "" means "." ---> so paths like "/usr/lib//libc.a" work */ | ||
43 | if (!len && (de->di_fname[0] == '.') && (de->di_fname[1] == '\0')) { | ||
44 | return 1; | ||
45 | } | ||
46 | thislen = strlen( de->di_fname ); | 42 | thislen = strlen( de->di_fname ); |
47 | if ( thislen > namelen ) | 43 | if ( thislen > namelen ) |
48 | thislen = namelen; | 44 | thislen = namelen; |