Changeset beb9336 in mainline for uspace/lib/ext4/libext4_inode.c
- Timestamp:
- 2012-08-24T14:07:52Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 041ab64
- Parents:
- bd29f9c9 (diff), db81577 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_inode.c
rbd29f9c9 rbeb9336 29 29 /** @addtogroup libext4 30 30 * @{ 31 */ 32 31 */ 33 32 /** 34 * @file 35 * @brief Ext4 inode structure operations.33 * @file libext4_inode.c 34 * @brief Ext4 i-node structure operations. 36 35 */ 37 36 38 37 #include <byteorder.h> 39 38 #include <errno.h> 40 #include < libblock.h>39 #include <block.h> 41 40 #include "libext4.h" 42 41 43 42 /** Compute number of bits for block count. 44 43 * 45 * @param block_size filesystem block_size 46 * @return number of bits 44 * @param block_size Filesystem block_size 45 * 46 * @return Number of bits 47 * 47 48 */ 48 49 static uint32_t ext4_inode_block_bits_count(uint32_t block_size) … … 50 51 uint32_t bits = 8; 51 52 uint32_t size = block_size; 52 53 53 54 do { 54 55 bits++; 55 56 size = size >> 1; 56 57 } while (size > 256); 57 58 58 59 return bits; 59 60 } … … 61 62 /** Get mode of the i-node. 62 63 * 63 * @param sb superblock 64 * @param inode i-node to load mode from 65 * @return mode of the i-node 64 * @param sb Superblock 65 * @param inode I-node to load mode from 66 * 67 * @return Mode of the i-node 68 * 66 69 */ 67 70 uint32_t ext4_inode_get_mode(ext4_superblock_t *sb, ext4_inode_t *inode) 68 71 { 69 72 if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_HURD) { 70 return ((uint32_t) uint16_t_le2host(inode->osd2.hurd2.mode_high)) << 16 |71 ((uint32_t) uint16_t_le2host(inode->mode));73 return ((uint32_t) uint16_t_le2host(inode->osd2.hurd2.mode_high)) << 16 | 74 ((uint32_t) uint16_t_le2host(inode->mode)); 72 75 } 76 73 77 return uint16_t_le2host(inode->mode); 74 78 } … … 76 80 /** Set mode of the i-node. 77 81 * 78 * @param sb superblock 79 * @param inode i-node to set mode to 80 * @param mode mode to set to i-node 82 * @param sb Superblock 83 * @param inode I-node to set mode to 84 * @param mode Mode to set to i-node 85 * 81 86 */ 82 87 void ext4_inode_set_mode(ext4_superblock_t *sb, ext4_inode_t *inode, uint32_t mode) 83 88 { 84 89 inode->mode = host2uint16_t_le((mode << 16) >> 16); 85 86 if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_HURD) {90 91 if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_HURD) 87 92 inode->osd2.hurd2.mode_high = host2uint16_t_le(mode >> 16); 88 }89 93 } 90 94 91 95 /** Get ID of the i-node owner (user id). 92 96 * 93 * @param inode i-node to load uid from 94 * @return user ID of the i-node owner 97 * @param inode I-node to load uid from 98 * 99 * @return User ID of the i-node owner 100 * 95 101 */ 96 102 uint32_t ext4_inode_get_uid(ext4_inode_t *inode) … … 101 107 /** Set ID of the i-node owner. 102 108 * 103 * @param inode i-node to set uid to 104 * @param uid ID of the i-node owner 109 * @param inode I-node to set uid to 110 * @param uid ID of the i-node owner 111 * 105 112 */ 106 113 void ext4_inode_set_uid(ext4_inode_t *inode, uint32_t uid) … … 111 118 /** Get real i-node size. 112 119 * 113 * @param sb superblock 114 * @param inode i-node to load size from 115 * @return real size of i-node 120 * @param sb Superblock 121 * @param inode I-node to load size from 122 * 123 * @return Real size of i-node 124 * 116 125 */ 117 126 uint64_t ext4_inode_get_size(ext4_superblock_t *sb, ext4_inode_t *inode) 118 127 { 119 128 uint32_t major_rev = ext4_superblock_get_rev_level(sb); 120 121 if ((major_rev > 0) && ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_FILE)) { 129 130 if ((major_rev > 0) && 131 (ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_FILE))) 122 132 return ((uint64_t)uint32_t_le2host(inode->size_hi)) << 32 | 123 124 }133 ((uint64_t)uint32_t_le2host(inode->size_lo)); 134 125 135 return uint32_t_le2host(inode->size_lo); 126 136 } … … 128 138 /** Set real i-node size. 129 139 * 130 * @param inode inode to set size to 131 * @param size size of the i-node 132 */ 133 void ext4_inode_set_size(ext4_inode_t *inode, uint64_t size) { 140 * @param inode I-node to set size to 141 * @param size Size of the i-node 142 * 143 */ 144 void ext4_inode_set_size(ext4_inode_t *inode, uint64_t size) 145 { 134 146 inode->size_lo = host2uint32_t_le((size << 32) >> 32); 135 147 inode->size_hi = host2uint32_t_le(size >> 32); … … 138 150 /** Get time, when i-node was last accessed. 139 151 * 140 * @param inode i-node 141 * @return time of the last access (POSIX) 152 * @param inode I-node 153 * 154 * @return Time of the last access (POSIX) 155 * 142 156 */ 143 157 uint32_t ext4_inode_get_access_time(ext4_inode_t *inode) … … 148 162 /** Set time, when i-node was last accessed. 149 163 * 150 * @param inode i-node 151 * @param time time of the last access (POSIX) 164 * @param inode I-node 165 * @param time Time of the last access (POSIX) 166 * 152 167 */ 153 168 void ext4_inode_set_access_time(ext4_inode_t *inode, uint32_t time) … … 158 173 /** Get time, when i-node was last changed. 159 174 * 160 * @param inode i-node 161 * @return time of the last change (POSIX) 175 * @param inode I-node 176 * 177 * @return Time of the last change (POSIX) 178 * 162 179 */ 163 180 uint32_t ext4_inode_get_change_inode_time(ext4_inode_t *inode) … … 168 185 /** Set time, when i-node was last changed. 169 186 * 170 * @param inode i-node 171 * @param time time of the last change (POSIX) 187 * @param inode I-node 188 * @param time Time of the last change (POSIX) 189 * 172 190 */ 173 191 void ext4_inode_set_change_inode_time(ext4_inode_t *inode, uint32_t time) … … 178 196 /** Get time, when i-node content was last modified. 179 197 * 180 * @param inode i-node 181 * @return time of the last content modification (POSIX) 198 * @param inode I-node 199 * 200 * @return Time of the last content modification (POSIX) 201 * 182 202 */ 183 203 uint32_t ext4_inode_get_modification_time(ext4_inode_t *inode) … … 188 208 /** Set time, when i-node content was last modified. 189 209 * 190 * @param inode i-node 191 * @param time time of the last content modification (POSIX) 210 * @param inode I-node 211 * @param time Time of the last content modification (POSIX) 212 * 192 213 */ 193 214 void ext4_inode_set_modification_time(ext4_inode_t *inode, uint32_t time) … … 198 219 /** Get time, when i-node was deleted. 199 220 * 200 * @param inode i-node 201 * @return time of the delete action (POSIX) 221 * @param inode I-node 222 * 223 * @return Time of the delete action (POSIX) 224 * 202 225 */ 203 226 uint32_t ext4_inode_get_deletion_time(ext4_inode_t *inode) … … 208 231 /** Set time, when i-node was deleted. 209 232 * 210 * @param inode i-node 211 * @param time time of the delete action (POSIX) 233 * @param inode I-node 234 * @param time Time of the delete action (POSIX) 235 * 212 236 */ 213 237 void ext4_inode_set_deletion_time(ext4_inode_t *inode, uint32_t time) … … 218 242 /** Get ID of the i-node owner's group. 219 243 * 220 * @param inode i-node to load gid from 221 * @return group ID of the i-node owner 244 * @param inode I-node to load gid from 245 * 246 * @return Group ID of the i-node owner 247 * 222 248 */ 223 249 uint32_t ext4_inode_get_gid(ext4_inode_t *inode) … … 228 254 /** Set ID ot the i-node owner's group. 229 255 * 230 * @param inode i-node to set gid to 231 * @param gid group ID of the i-node owner 256 * @param inode I-node to set gid to 257 * @param gid Group ID of the i-node owner 258 * 232 259 */ 233 260 void ext4_inode_set_gid(ext4_inode_t *inode, uint32_t gid) … … 238 265 /** Get number of links to i-node. 239 266 * 240 * @param inode i-node to load number of links from 241 * @return number of links to i-node 267 * @param inode I-node to load number of links from 268 * 269 * @return Number of links to i-node 270 * 242 271 */ 243 272 uint16_t ext4_inode_get_links_count(ext4_inode_t *inode) … … 248 277 /** Set number of links to i-node. 249 278 * 250 * @param inode i-node to set number of links to 251 * @param count number of links to i-node 279 * @param inode I-node to set number of links to 280 * @param count Number of links to i-node 281 * 252 282 */ 253 283 void ext4_inode_set_links_count(ext4_inode_t *inode, uint16_t count) … … 258 288 /** Get number of 512-bytes blocks used for i-node. 259 289 * 260 * @param sb superblock 261 * @param inode i-node 262 * @return number of 512-bytes blocks 290 * @param sb Superblock 291 * @param inode I-node 292 * 293 * @return Number of 512-bytes blocks 294 * 263 295 */ 264 296 uint64_t ext4_inode_get_blocks_count(ext4_superblock_t *sb, ext4_inode_t *inode) 265 297 { 266 if (ext4_superblock_has_feature_read_only(sb, EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) {267 298 if (ext4_superblock_has_feature_read_only(sb, 299 EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) { 268 300 /* 48-bit field */ 269 uint64_t count = ((uint64_t)uint16_t_le2host(inode->osd2.linux2.blocks_high)) << 32 | 270 uint32_t_le2host(inode->blocks_count_lo); 271 301 uint64_t count = ((uint64_t) 302 uint16_t_le2host(inode->osd2.linux2.blocks_high)) << 32 | 303 uint32_t_le2host(inode->blocks_count_lo); 304 272 305 if (ext4_inode_has_flag(inode, EXT4_INODE_FLAG_HUGE_FILE)) { 273 274 275 return count 276 } else {306 uint32_t block_size = ext4_superblock_get_block_size(sb); 307 uint32_t block_bits = ext4_inode_block_bits_count(block_size); 308 return count << (block_bits - 9); 309 } else 277 310 return count; 278 } 311 } else 312 return uint32_t_le2host(inode->blocks_count_lo); 313 } 314 315 /** Set number of 512-bytes blocks used for i-node. 316 * 317 * @param sb Superblock 318 * @param inode I-node 319 * @param count Number of 512-bytes blocks 320 * 321 * @return Error code 322 * 323 */ 324 int ext4_inode_set_blocks_count(ext4_superblock_t *sb, ext4_inode_t *inode, 325 uint64_t count) 326 { 327 /* 32-bit maximum */ 328 uint64_t max = 0; 329 max = ~max >> 32; 330 331 if (count <= max) { 332 inode->blocks_count_lo = host2uint32_t_le(count); 333 inode->osd2.linux2.blocks_high = 0; 334 ext4_inode_clear_flag(inode, EXT4_INODE_FLAG_HUGE_FILE); 335 336 return EOK; 337 } 338 339 /* Check if there can be used huge files (many blocks) */ 340 if (!ext4_superblock_has_feature_read_only(sb, 341 EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) 342 return EINVAL; 343 344 /* 48-bit maximum */ 345 max = 0; 346 max = ~max >> 16; 347 348 if (count <= max) { 349 inode->blocks_count_lo = host2uint32_t_le(count); 350 inode->osd2.linux2.blocks_high = host2uint16_t_le(count >> 32); 351 ext4_inode_clear_flag(inode, EXT4_INODE_FLAG_HUGE_FILE); 279 352 } else { 280 return uint32_t_le2host(inode->blocks_count_lo); 281 } 282 } 283 284 /** Set number of 512-bytes blocks used for i-node. 285 * 286 * @param sb superblock 287 * @param inode i-node 288 * @param count number of 512-bytes blocks 289 * @return error code 290 */ 291 int ext4_inode_set_blocks_count(ext4_superblock_t *sb, ext4_inode_t *inode, 292 uint64_t count) 293 { 294 /* 32-bit maximum */ 295 uint64_t max = 0; 296 max = ~max >> 32; 297 298 if (count <= max) { 299 inode->blocks_count_lo = host2uint32_t_le(count); 300 inode->osd2.linux2.blocks_high = 0; 301 ext4_inode_clear_flag(inode, EXT4_INODE_FLAG_HUGE_FILE); 302 return EOK; 303 } 304 305 /* Check if there can be used huge files (many blocks) */ 306 if (!ext4_superblock_has_feature_read_only(sb, EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) { 307 return EINVAL; 308 } 309 310 /* 48-bit maximum */ 311 max = 0; 312 max = ~max >> 16; 313 314 if (count <= max) { 315 inode->blocks_count_lo = host2uint32_t_le(count); 316 inode->osd2.linux2.blocks_high = host2uint16_t_le(count >> 32); 317 ext4_inode_clear_flag(inode, EXT4_INODE_FLAG_HUGE_FILE); 318 } else { 319 uint32_t block_size = ext4_superblock_get_block_size(sb); 320 uint32_t block_bits = ext4_inode_block_bits_count(block_size); 321 ext4_inode_set_flag(inode, EXT4_INODE_FLAG_HUGE_FILE); 322 count = count >> (block_bits - 9); 323 inode->blocks_count_lo = host2uint32_t_le(count); 324 inode->osd2.linux2.blocks_high = host2uint16_t_le(count >> 32); 325 } 326 return EOK; 353 uint32_t block_size = ext4_superblock_get_block_size(sb); 354 uint32_t block_bits = ext4_inode_block_bits_count(block_size); 355 ext4_inode_set_flag(inode, EXT4_INODE_FLAG_HUGE_FILE); 356 count = count >> (block_bits - 9); 357 inode->blocks_count_lo = host2uint32_t_le(count); 358 inode->osd2.linux2.blocks_high = host2uint16_t_le(count >> 32); 359 } 360 361 return EOK; 327 362 } 328 363 329 364 /** Get flags (features) of i-node. 330 * 331 * @param inode i-node to get flags from 332 * @return flags (bitmap) 333 */ 334 uint32_t ext4_inode_get_flags(ext4_inode_t *inode) { 365 * 366 * @param inode I-node to get flags from 367 * 368 * @return Flags (bitmap) 369 * 370 */ 371 uint32_t ext4_inode_get_flags(ext4_inode_t *inode) 372 { 335 373 return uint32_t_le2host(inode->flags); 336 374 } … … 338 376 /** Set flags (features) of i-node. 339 377 * 340 * @param inode i-node to set flags to 341 * @param flags flags to set to i-node 342 */ 343 void ext4_inode_set_flags(ext4_inode_t *inode, uint32_t flags) { 378 * @param inode I-node to set flags to 379 * @param flags Flags to set to i-node 380 * 381 */ 382 void ext4_inode_set_flags(ext4_inode_t *inode, uint32_t flags) 383 { 344 384 inode->flags = host2uint32_t_le(flags); 345 385 } … … 347 387 /** Get file generation (used by NFS). 348 388 * 349 * @param inode i-node 350 * @return file generation 389 * @param inode I-node 390 * 391 * @return File generation 392 * 351 393 */ 352 394 uint32_t ext4_inode_get_generation(ext4_inode_t *inode) … … 357 399 /** Set file generation (used by NFS). 358 400 * 359 * @param inode i-node 360 * @param generation file generation 401 * @param inode I-node 402 * @param generation File generation 403 * 361 404 */ 362 405 void ext4_inode_set_generation(ext4_inode_t *inode, uint32_t generation) … … 367 410 /** Get address of block, where are extended attributes located. 368 411 * 369 * @param inode i-node 370 * @param sb superblock 371 * @return block address 412 * @param inode I-node 413 * @param sb Superblock 414 * 415 * @return Block address 416 * 372 417 */ 373 418 uint64_t ext4_inode_get_file_acl(ext4_inode_t *inode, ext4_superblock_t *sb) 374 419 { 375 if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_LINUX) { 376 return ((uint32_t)uint16_t_le2host(inode->osd2.linux2.file_acl_high)) << 16 | 420 if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_LINUX) 421 return ((uint32_t) 422 uint16_t_le2host(inode->osd2.linux2.file_acl_high)) << 16 | 377 423 (uint32_t_le2host(inode->file_acl_lo)); 378 } 379 424 380 425 return uint32_t_le2host(inode->file_acl_lo); 381 426 } … … 383 428 /** Set address of block, where are extended attributes located. 384 429 * 385 * @param inode i-node 386 * @param sb superblock 387 * @param file_acl block address 430 * @param inode I-node 431 * @param sb Superblock 432 * @param file_acl Block address 433 * 388 434 */ 389 435 void ext4_inode_set_file_acl(ext4_inode_t *inode, ext4_superblock_t *sb, 390 436 uint64_t file_acl) 391 437 { 392 438 inode->file_acl_lo = host2uint32_t_le((file_acl << 32) >> 32); 393 394 if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_LINUX) {439 440 if (ext4_superblock_get_creator_os(sb) == EXT4_SUPERBLOCK_OS_LINUX) 395 441 inode->osd2.linux2.file_acl_high = host2uint16_t_le(file_acl >> 32); 396 } 397 } 398 399 /***********************************************************************/ 442 } 400 443 401 444 /** Get block address of specified direct block. 402 445 * 403 * @param inode i-node to load block from 404 * @param idx index of logical block 405 * @return physical block address 446 * @param inode I-node to load block from 447 * @param idx Index of logical block 448 * 449 * @return Physical block address 450 * 406 451 */ 407 452 uint32_t ext4_inode_get_direct_block(ext4_inode_t *inode, uint32_t idx) 408 453 { 409 454 assert(idx < EXT4_INODE_DIRECT_BLOCK_COUNT); 455 410 456 return uint32_t_le2host(inode->blocks[idx]); 411 457 } … … 413 459 /** Set block address of specified direct block. 414 460 * 415 * @param inode i-node to set block address to 416 * @param idx index of logical block 417 * @param fblock physical block address 461 * @param inode I-node to set block address to 462 * @param idx Index of logical block 463 * @param fblock Physical block address 464 * 418 465 */ 419 466 void ext4_inode_set_direct_block(ext4_inode_t *inode, uint32_t idx, uint32_t fblock) 420 467 { 421 468 assert(idx < EXT4_INODE_DIRECT_BLOCK_COUNT); 469 422 470 inode->blocks[idx] = host2uint32_t_le(fblock); 423 471 } … … 425 473 /** Get block address of specified indirect block. 426 474 * 427 * @param inode i-node to get block address from 428 * @param idx index of indirect block 429 * @return physical block address 475 * @param inode I-node to get block address from 476 * @param idx Index of indirect block 477 * 478 * @return Physical block address 479 * 430 480 */ 431 481 uint32_t ext4_inode_get_indirect_block(ext4_inode_t *inode, uint32_t idx) … … 436 486 /** Set block address of specified indirect block. 437 487 * 438 * @param inode i-node to set block address to 439 * @param idx index of indirect block 440 * @param fblock physical block address 441 */ 442 void ext4_inode_set_indirect_block(ext4_inode_t *inode, uint32_t idx, uint32_t fblock) 443 { 444 inode->blocks[idx + EXT4_INODE_INDIRECT_BLOCK] = host2uint32_t_le(fblock); 488 * @param inode I-node to set block address to 489 * @param idx Index of indirect block 490 * @param fblock Physical block address 491 * 492 */ 493 void ext4_inode_set_indirect_block(ext4_inode_t *inode, uint32_t idx, 494 uint32_t fblock) 495 { 496 inode->blocks[idx + EXT4_INODE_INDIRECT_BLOCK] = 497 host2uint32_t_le(fblock); 445 498 } 446 499 447 500 /** Check if i-node has specified type. 448 501 * 449 * @param sb superblock 450 * @param inode i-node to check type of 451 * @param type type to check 452 * @return result of check operation 453 */ 454 bool ext4_inode_is_type(ext4_superblock_t *sb, ext4_inode_t *inode, uint32_t type) 502 * @param sb Superblock 503 * @param inode I-node to check type of 504 * @param type Type to check 505 * 506 * @return Result of check operation 507 * 508 */ 509 bool ext4_inode_is_type(ext4_superblock_t *sb, ext4_inode_t *inode, 510 uint32_t type) 455 511 { 456 512 uint32_t mode = ext4_inode_get_mode(sb, inode); … … 460 516 /** Get extent header from the root of the extent tree. 461 517 * 462 * @param inode i-node to get extent header from 463 * @return pointer to extent header of the root node 518 * @param inode I-node to get extent header from 519 * 520 * @return Pointer to extent header of the root node 521 * 464 522 */ 465 523 ext4_extent_header_t * ext4_inode_get_extent_header(ext4_inode_t *inode) 466 524 { 467 return (ext4_extent_header_t *) inode->blocks;525 return (ext4_extent_header_t *) inode->blocks; 468 526 } 469 527 470 528 /** Check if i-node has specified flag. 471 529 * 472 * @param inode i-node to check flags of 473 * @param flag flag to check 474 * @return result of check operation 530 * @param inode I-node to check flags of 531 * @param flag Flag to check 532 * 533 * @return Result of check operation 534 * 475 535 */ 476 536 bool ext4_inode_has_flag(ext4_inode_t *inode, uint32_t flag) 477 537 { 478 if (ext4_inode_get_flags(inode) & flag) {538 if (ext4_inode_get_flags(inode) & flag) 479 539 return true; 480 }540 481 541 return false; 482 542 } … … 484 544 /** Remove specified flag from i-node. 485 545 * 486 * @param inode i-node to clear flag on 487 * @param clear_flag flag to be cleared 546 * @param inode I-node to clear flag on 547 * @param clear_flag Flag to be cleared 548 * 488 549 */ 489 550 void ext4_inode_clear_flag(ext4_inode_t *inode, uint32_t clear_flag) … … 496 557 /** Set specified flag to i-node. 497 558 * 498 * @param inode i-node to set flag on 499 * @param set_flag falt to be set 559 * @param inode I-node to set flag on 560 * @param set_flag Flag to be set 561 * 500 562 */ 501 563 void ext4_inode_set_flag(ext4_inode_t *inode, uint32_t set_flag) … … 508 570 /** Check if i-node can be truncated. 509 571 * 510 * @param sb superblock 511 * @param inode i-node to check 512 * @return result of the check operation 572 * @param sb Superblock 573 * @param inode I-node to check 574 * 575 * @return Result of the check operation 576 * 513 577 */ 514 578 bool ext4_inode_can_truncate(ext4_superblock_t *sb, ext4_inode_t *inode) 515 579 { 516 if (ext4_inode_has_flag(inode, EXT4_INODE_FLAG_APPEND) 517 || ext4_inode_has_flag(inode, EXT4_INODE_FLAG_IMMUTABLE)) { 518 return false; 519 } 520 521 if (ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_FILE) 522 || ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_DIRECTORY)) { 523 return true; 524 } 525 526 return false; 580 if ((ext4_inode_has_flag(inode, EXT4_INODE_FLAG_APPEND)) || 581 (ext4_inode_has_flag(inode, EXT4_INODE_FLAG_IMMUTABLE))) 582 return false; 583 584 if ((ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_FILE)) || 585 (ext4_inode_is_type(sb, inode, EXT4_INODE_MODE_DIRECTORY))) 586 return true; 587 588 return false; 527 589 } 528 590 529 591 /** 530 592 * @} 531 */ 593 */
Note:
See TracChangeset
for help on using the changeset viewer.