Lines Matching refs:res
112 int res; in __hfs_ext_write_extent() local
116 res = hfs_brec_find(fd); in __hfs_ext_write_extent()
118 if (res != -ENOENT) in __hfs_ext_write_extent()
119 return res; in __hfs_ext_write_extent()
123 if (res) in __hfs_ext_write_extent()
124 return res; in __hfs_ext_write_extent()
134 int res = 0; in hfs_ext_write_extent() local
137 res = hfs_find_init(HFS_SB(inode->i_sb)->ext_tree, &fd); in hfs_ext_write_extent()
138 if (res) in hfs_ext_write_extent()
139 return res; in hfs_ext_write_extent()
140 res = __hfs_ext_write_extent(inode, &fd); in hfs_ext_write_extent()
143 return res; in hfs_ext_write_extent()
149 int res; in __hfs_ext_read_extent() local
153 res = hfs_brec_find(fd); in __hfs_ext_read_extent()
154 if (res && res != -ENOENT) in __hfs_ext_read_extent()
155 return res; in __hfs_ext_read_extent()
167 int res; in __hfs_ext_cache_extent() local
170 res = __hfs_ext_write_extent(inode, fd); in __hfs_ext_cache_extent()
171 if (res) in __hfs_ext_cache_extent()
172 return res; in __hfs_ext_cache_extent()
175 res = __hfs_ext_read_extent(fd, HFS_I(inode)->cached_extents, inode->i_ino, in __hfs_ext_cache_extent()
177 if (!res) { in __hfs_ext_cache_extent()
184 return res; in __hfs_ext_cache_extent()
190 int res; in hfs_ext_read_extent() local
196 res = hfs_find_init(HFS_SB(inode->i_sb)->ext_tree, &fd); in hfs_ext_read_extent()
197 if (!res) { in hfs_ext_read_extent()
198 res = __hfs_ext_cache_extent(&fd, inode, block); in hfs_ext_read_extent()
201 return res; in hfs_ext_read_extent()
289 int res, i; in hfs_free_fork() local
306 res = hfs_free_extents(sb, extent, blocks, blocks); in hfs_free_fork()
307 if (res) in hfs_free_fork()
308 return res; in hfs_free_fork()
312 res = hfs_find_init(HFS_SB(sb)->ext_tree, &fd); in hfs_free_fork()
313 if (res) in hfs_free_fork()
314 return res; in hfs_free_fork()
316 res = __hfs_ext_read_extent(&fd, extent, cnid, total_blocks, type); in hfs_free_fork()
317 if (res) in hfs_free_fork()
326 return res; in hfs_free_fork()
337 int res; in hfs_get_block() local
347 res = hfs_extend_file(inode); in hfs_get_block()
348 if (res) in hfs_get_block()
349 return res; in hfs_get_block()
360 res = hfs_ext_read_extent(inode, ablock); in hfs_get_block()
361 if (!res) in hfs_get_block()
389 int res; in hfs_extend_file() local
395 res = hfs_ext_read_extent(inode, HFS_I(inode)->alloc_blocks); in hfs_extend_file()
396 if (res) in hfs_extend_file()
404 res = -ENOSPC; in hfs_extend_file()
415 res = 0; in hfs_extend_file()
418 res = hfs_add_extent(HFS_I(inode)->first_extents, in hfs_extend_file()
421 if (res == -ENOSPC) in hfs_extend_file()
424 if (!res) { in hfs_extend_file()
429 res = hfs_add_extent(HFS_I(inode)->cached_extents, in hfs_extend_file()
433 if (!res) { in hfs_extend_file()
437 } else if (res == -ENOSPC) in hfs_extend_file()
442 if (!res) { in hfs_extend_file()
450 return res; in hfs_extend_file()
454 res = hfs_ext_write_extent(inode); in hfs_extend_file()
455 if (res) in hfs_extend_file()
466 res = 0; in hfs_extend_file()
476 int res; in hfs_file_truncate() local
488 res = pagecache_write_begin(NULL, mapping, size+1, 0, in hfs_file_truncate()
490 if (!res) { in hfs_file_truncate()
491 res = pagecache_write_end(NULL, mapping, size+1, 0, 0, in hfs_file_truncate()
494 if (res) in hfs_file_truncate()
506 res = hfs_find_init(HFS_SB(sb)->ext_tree, &fd); in hfs_file_truncate()
507 if (res) { in hfs_file_truncate()
520 res = __hfs_ext_cache_extent(&fd, inode, alloc_cnt); in hfs_file_truncate()
521 if (res) in hfs_file_truncate()