Lines Matching refs:res

90 	int res;  in __hfsplus_ext_write_extent()  local
98 res = hfs_brec_find(fd, hfs_find_rec_by_key); in __hfsplus_ext_write_extent()
100 if (res != -ENOENT) in __hfsplus_ext_write_extent()
101 return res; in __hfsplus_ext_write_extent()
106 if (res) in __hfsplus_ext_write_extent()
107 return res; in __hfsplus_ext_write_extent()
126 int res = 0; in hfsplus_ext_write_extent_locked() local
131 res = hfs_find_init(HFSPLUS_SB(inode->i_sb)->ext_tree, &fd); in hfsplus_ext_write_extent_locked()
132 if (res) in hfsplus_ext_write_extent_locked()
133 return res; in hfsplus_ext_write_extent_locked()
134 res = __hfsplus_ext_write_extent(inode, &fd); in hfsplus_ext_write_extent_locked()
137 return res; in hfsplus_ext_write_extent_locked()
142 int res; in hfsplus_ext_write_extent() local
145 res = hfsplus_ext_write_extent_locked(inode); in hfsplus_ext_write_extent()
148 return res; in hfsplus_ext_write_extent()
155 int res; in __hfsplus_ext_read_extent() local
159 res = hfs_brec_find(fd, hfs_find_rec_by_key); in __hfsplus_ext_read_extent()
160 if (res && res != -ENOENT) in __hfsplus_ext_read_extent()
161 return res; in __hfsplus_ext_read_extent()
176 int res; in __hfsplus_ext_cache_extent() local
181 res = __hfsplus_ext_write_extent(inode, fd); in __hfsplus_ext_cache_extent()
182 if (res) in __hfsplus_ext_cache_extent()
183 return res; in __hfsplus_ext_cache_extent()
186 res = __hfsplus_ext_read_extent(fd, hip->cached_extents, inode->i_ino, in __hfsplus_ext_cache_extent()
190 if (!res) { in __hfsplus_ext_cache_extent()
198 return res; in __hfsplus_ext_cache_extent()
205 int res; in hfsplus_ext_read_extent() local
211 res = hfs_find_init(HFSPLUS_SB(inode->i_sb)->ext_tree, &fd); in hfsplus_ext_read_extent()
212 if (!res) { in hfsplus_ext_read_extent()
213 res = __hfsplus_ext_cache_extent(&fd, inode, block); in hfsplus_ext_read_extent()
216 return res; in hfsplus_ext_read_extent()
226 int res = -EIO; in hfsplus_get_block() local
238 res = hfsplus_file_extend(inode, false); in hfsplus_get_block()
239 if (res) in hfsplus_get_block()
240 return res; in hfsplus_get_block()
261 res = hfsplus_ext_read_extent(inode, ablock); in hfsplus_get_block()
262 if (res) { in hfsplus_get_block()
392 int res, i; in hfsplus_free_fork() local
402 res = hfsplus_free_extents(sb, fork->extents, blocks, blocks); in hfsplus_free_fork()
403 if (res) in hfsplus_free_fork()
404 return res; in hfsplus_free_fork()
408 res = hfs_find_init(HFSPLUS_SB(sb)->ext_tree, &fd); in hfsplus_free_fork()
409 if (res) in hfsplus_free_fork()
410 return res; in hfsplus_free_fork()
412 res = __hfsplus_ext_read_extent(&fd, ext_entry, cnid, in hfsplus_free_fork()
414 if (res) in hfsplus_free_fork()
425 return res; in hfsplus_free_fork()
434 int res; in hfsplus_file_extend() local
449 res = hfsplus_ext_read_extent(inode, hip->alloc_blocks); in hfsplus_file_extend()
450 if (res) in hfsplus_file_extend()
460 res = -ENOSPC; in hfsplus_file_extend()
466 res = sb_issue_zeroout(sb, start, len, GFP_NOFS); in hfsplus_file_extend()
467 if (res) in hfsplus_file_extend()
479 res = 0; in hfsplus_file_extend()
482 res = hfsplus_add_extent(hip->first_extents, in hfsplus_file_extend()
485 if (res == -ENOSPC) in hfsplus_file_extend()
488 if (!res) { in hfsplus_file_extend()
493 res = hfsplus_add_extent(hip->cached_extents, in hfsplus_file_extend()
496 if (!res) { in hfsplus_file_extend()
500 } else if (res == -ENOSPC) in hfsplus_file_extend()
504 if (!res) { in hfsplus_file_extend()
511 return res; in hfsplus_file_extend()
515 res = hfsplus_ext_write_extent_locked(inode); in hfsplus_file_extend()
516 if (res) in hfsplus_file_extend()
527 res = 0; in hfsplus_file_extend()
537 int res; in hfsplus_file_truncate() local
548 res = pagecache_write_begin(NULL, mapping, size, 0, in hfsplus_file_truncate()
551 if (res) in hfsplus_file_truncate()
553 res = pagecache_write_end(NULL, mapping, size, in hfsplus_file_truncate()
555 if (res < 0) in hfsplus_file_truncate()
571 res = hfs_find_init(HFSPLUS_SB(sb)->ext_tree, &fd); in hfsplus_file_truncate()
572 if (res) { in hfsplus_file_truncate()
585 res = __hfsplus_ext_cache_extent(&fd, inode, alloc_cnt); in hfsplus_file_truncate()
586 if (res) in hfsplus_file_truncate()