Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nilfs2: add missing return value kernel-doc descriptions

There are a number of kernel-doc comments for functions that are missing
return values, which also causes a number of warnings when the kernel-doc
script is run with the "-Wall" option.

Fix this issue by adding proper return value descriptions, and improve
code maintainability.

Link: https://lkml.kernel.org/r/20250110010530.21872-7-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: "Brian G ." <gissf1@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Ryusuke Konishi and committed by
Andrew Morton
fd4e7fad 343d4a33

+160 -7
+65 -2
fs/nilfs2/alloc.c
··· 21 21 * nilfs_palloc_groups_per_desc_block - get the number of groups that a group 22 22 * descriptor block can maintain 23 23 * @inode: inode of metadata file using this allocator 24 + * 25 + * Return: Number of groups that a group descriptor block can maintain. 24 26 */ 25 27 static inline unsigned long 26 28 nilfs_palloc_groups_per_desc_block(const struct inode *inode) ··· 34 32 /** 35 33 * nilfs_palloc_groups_count - get maximum number of groups 36 34 * @inode: inode of metadata file using this allocator 35 + * 36 + * Return: Maximum number of groups. 37 37 */ 38 38 static inline unsigned long 39 39 nilfs_palloc_groups_count(const struct inode *inode) ··· 47 43 * nilfs_palloc_init_blockgroup - initialize private variables for allocator 48 44 * @inode: inode of metadata file using this allocator 49 45 * @entry_size: size of the persistent object 46 + * 47 + * Return: 0 on success, or a negative error code on failure. 50 48 */ 51 49 int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned int entry_size) 52 50 { ··· 84 78 * @inode: inode of metadata file using this allocator 85 79 * @nr: serial number of the entry (e.g. inode number) 86 80 * @offset: pointer to store offset number in the group 81 + * 82 + * Return: Number of the group that contains the entry with the index 83 + * specified by @nr. 87 84 */ 88 85 static unsigned long nilfs_palloc_group(const struct inode *inode, __u64 nr, 89 86 unsigned long *offset) ··· 102 93 * @inode: inode of metadata file using this allocator 103 94 * @group: group number 104 95 * 105 - * nilfs_palloc_desc_blkoff() returns block offset of the descriptor 106 - * block which contains a descriptor of the specified group. 96 + * Return: Index number in the metadata file of the descriptor block of 97 + * the group specified by @group. 107 98 */ 108 99 static unsigned long 109 100 nilfs_palloc_desc_blkoff(const struct inode *inode, unsigned long group) ··· 120 111 * 121 112 * nilfs_palloc_bitmap_blkoff() returns block offset of the bitmap 122 113 * block used to allocate/deallocate entries in the specified group. 114 + * 115 + * Return: Index number in the metadata file of the bitmap block of 116 + * the group specified by @group. 123 117 */ 124 118 static unsigned long 125 119 nilfs_palloc_bitmap_blkoff(const struct inode *inode, unsigned long group) ··· 137 125 * nilfs_palloc_group_desc_nfrees - get the number of free entries in a group 138 126 * @desc: pointer to descriptor structure for the group 139 127 * @lock: spin lock protecting @desc 128 + * 129 + * Return: Number of free entries written in the group descriptor @desc. 140 130 */ 141 131 static unsigned long 142 132 nilfs_palloc_group_desc_nfrees(const struct nilfs_palloc_group_desc *desc, ··· 157 143 * @desc: pointer to descriptor structure for the group 158 144 * @lock: spin lock protecting @desc 159 145 * @n: delta to be added 146 + * 147 + * Return: Number of free entries after adjusting the group descriptor 148 + * @desc. 160 149 */ 161 150 static u32 162 151 nilfs_palloc_group_desc_add_entries(struct nilfs_palloc_group_desc *desc, ··· 178 161 * nilfs_palloc_entry_blkoff - get block offset of an entry block 179 162 * @inode: inode of metadata file using this allocator 180 163 * @nr: serial number of the entry (e.g. inode number) 164 + * 165 + * Return: Index number in the metadata file of the block containing 166 + * the entry specified by @nr. 181 167 */ 182 168 static unsigned long 183 169 nilfs_palloc_entry_blkoff(const struct inode *inode, __u64 nr) ··· 258 238 * @blkoff: block offset 259 239 * @prev: nilfs_bh_assoc struct of the last used buffer 260 240 * @lock: spin lock protecting @prev 241 + * 242 + * Return: 0 on success, or one of the following negative error codes on 243 + * failure: 244 + * * %-EIO - I/O error (including metadata corruption). 245 + * * %-ENOENT - Non-existent block. 246 + * * %-ENOMEM - Insufficient memory available. 261 247 */ 262 248 static int nilfs_palloc_delete_block(struct inode *inode, unsigned long blkoff, 263 249 struct nilfs_bh_assoc *prev, ··· 284 258 * @group: group number 285 259 * @create: create flag 286 260 * @bhp: pointer to store the resultant buffer head 261 + * 262 + * Return: 0 on success, or a negative error code on failure. 287 263 */ 288 264 static int nilfs_palloc_get_desc_block(struct inode *inode, 289 265 unsigned long group, ··· 305 277 * @group: group number 306 278 * @create: create flag 307 279 * @bhp: pointer to store the resultant buffer head 280 + * 281 + * Return: 0 on success, or a negative error code on failure. 308 282 */ 309 283 static int nilfs_palloc_get_bitmap_block(struct inode *inode, 310 284 unsigned long group, ··· 324 294 * nilfs_palloc_delete_bitmap_block - delete a bitmap block 325 295 * @inode: inode of metadata file using this allocator 326 296 * @group: group number 297 + * 298 + * Return: 0 on success, or a negative error code on failure. 327 299 */ 328 300 static int nilfs_palloc_delete_bitmap_block(struct inode *inode, 329 301 unsigned long group) ··· 344 312 * @nr: serial number of the entry (e.g. inode number) 345 313 * @create: create flag 346 314 * @bhp: pointer to store the resultant buffer head 315 + * 316 + * Return: 0 on success, or a negative error code on failure. 347 317 */ 348 318 int nilfs_palloc_get_entry_block(struct inode *inode, __u64 nr, 349 319 int create, struct buffer_head **bhp) ··· 362 328 * nilfs_palloc_delete_entry_block - delete an entry block 363 329 * @inode: inode of metadata file using this allocator 364 330 * @nr: serial number of the entry 331 + * 332 + * Return: 0 on success, or a negative error code on failure. 365 333 */ 366 334 static int nilfs_palloc_delete_entry_block(struct inode *inode, __u64 nr) 367 335 { ··· 433 397 * @bsize: size in bits 434 398 * @lock: spin lock protecting @bitmap 435 399 * @wrap: whether to wrap around 400 + * 401 + * Return: Offset number within the group of the found free entry, or 402 + * %-ENOSPC if not found. 436 403 */ 437 404 static int nilfs_palloc_find_available_slot(unsigned char *bitmap, 438 405 unsigned long target, ··· 477 438 * @inode: inode of metadata file using this allocator 478 439 * @curr: current group number 479 440 * @max: maximum number of groups 441 + * 442 + * Return: Number of remaining descriptors (= groups) managed by the descriptor 443 + * block. 480 444 */ 481 445 static unsigned long 482 446 nilfs_palloc_rest_groups_in_desc_block(const struct inode *inode, ··· 495 453 * nilfs_palloc_count_desc_blocks - count descriptor blocks number 496 454 * @inode: inode of metadata file using this allocator 497 455 * @desc_blocks: descriptor blocks number [out] 456 + * 457 + * Return: 0 on success, or a negative error code on failure. 498 458 */ 499 459 static int nilfs_palloc_count_desc_blocks(struct inode *inode, 500 460 unsigned long *desc_blocks) ··· 517 473 * MDT file growing 518 474 * @inode: inode of metadata file using this allocator 519 475 * @desc_blocks: known current descriptor blocks count 476 + * 477 + * Return: true if a group can be added in the metadata file, false if not. 520 478 */ 521 479 static inline bool nilfs_palloc_mdt_file_can_grow(struct inode *inode, 522 480 unsigned long desc_blocks) ··· 533 487 * @inode: inode of metadata file using this allocator 534 488 * @nused: current number of used entries 535 489 * @nmaxp: max number of entries [out] 490 + * 491 + * Return: 0 on success, or one of the following negative error codes on 492 + * failure: 493 + * * %-EIO - I/O error (including metadata corruption). 494 + * * %-ENOMEM - Insufficient memory available. 495 + * * %-ERANGE - Number of entries in use is out of range. 536 496 */ 537 497 int nilfs_palloc_count_max_entries(struct inode *inode, u64 nused, u64 *nmaxp) 538 498 { ··· 570 518 * @inode: inode of metadata file using this allocator 571 519 * @req: nilfs_palloc_req structure exchanged for the allocation 572 520 * @wrap: whether to wrap around 521 + * 522 + * Return: 0 on success, or one of the following negative error codes on 523 + * failure: 524 + * * %-EIO - I/O error (including metadata corruption). 525 + * * %-ENOMEM - Insufficient memory available. 526 + * * %-ENOSPC - Entries exhausted (No entries available for allocation). 527 + * * %-EROFS - Read only filesystem 573 528 */ 574 529 int nilfs_palloc_prepare_alloc_entry(struct inode *inode, 575 530 struct nilfs_palloc_req *req, bool wrap) ··· 769 710 * nilfs_palloc_prepare_free_entry - prepare to deallocate a persistent object 770 711 * @inode: inode of metadata file using this allocator 771 712 * @req: nilfs_palloc_req structure exchanged for the removal 713 + * 714 + * Return: 0 on success, or a negative error code on failure. 772 715 */ 773 716 int nilfs_palloc_prepare_free_entry(struct inode *inode, 774 717 struct nilfs_palloc_req *req) ··· 815 754 * @inode: inode of metadata file using this allocator 816 755 * @entry_nrs: array of entry numbers to be deallocated 817 756 * @nitems: number of entries stored in @entry_nrs 757 + * 758 + * Return: 0 on success, or a negative error code on failure. 818 759 */ 819 760 int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems) 820 761 {
+2
fs/nilfs2/alloc.h
··· 21 21 * 22 22 * The number of entries per group is defined by the number of bits 23 23 * that a bitmap block can maintain. 24 + * 25 + * Return: Number of entries per group. 24 26 */ 25 27 static inline unsigned long 26 28 nilfs_palloc_entries_per_group(const struct inode *inode)
+2
fs/nilfs2/cpfile.c
··· 1124 1124 * @cpsize: size of a checkpoint entry 1125 1125 * @raw_inode: on-disk cpfile inode 1126 1126 * @inodep: buffer to store the inode 1127 + * 1128 + * Return: 0 on success, or a negative error code on failure. 1127 1129 */ 1128 1130 int nilfs_cpfile_read(struct super_block *sb, size_t cpsize, 1129 1131 struct nilfs_inode *raw_inode, struct inode **inodep)
+2
fs/nilfs2/dat.c
··· 481 481 * @entry_size: size of a dat entry 482 482 * @raw_inode: on-disk dat inode 483 483 * @inodep: buffer to store the inode 484 + * 485 + * Return: 0 on success, or a negative error code on failure. 484 486 */ 485 487 int nilfs_dat_read(struct super_block *sb, size_t entry_size, 486 488 struct nilfs_inode *raw_inode, struct inode **inodep)
+2
fs/nilfs2/ifile.c
··· 146 146 * @ifile: ifile inode 147 147 * @nmaxinodes: current maximum of available inodes count [out] 148 148 * @nfreeinodes: free inodes count [out] 149 + * 150 + * Return: 0 on success, or a negative error code on failure. 149 151 */ 150 152 int nilfs_ifile_count_free_inodes(struct inode *ifile, 151 153 u64 *nmaxinodes, u64 *nfreeinodes)
+4
fs/nilfs2/inode.c
··· 68 68 * 69 69 * This function does not issue actual read request of the specified data 70 70 * block. It is done by VFS. 71 + * 72 + * Return: 0 on success, or a negative error code on failure. 71 73 */ 72 74 int nilfs_get_block(struct inode *inode, sector_t blkoff, 73 75 struct buffer_head *bh_result, int create) ··· 143 141 * address_space_operations. 144 142 * @file: file struct of the file to be read 145 143 * @folio: the folio to be read 144 + * 145 + * Return: 0 on success, or a negative error code on failure. 146 146 */ 147 147 static int nilfs_read_folio(struct file *file, struct folio *folio) 148 148 {
+4
fs/nilfs2/mdt.c
··· 519 519 * nilfs_mdt_setup_shadow_map - setup shadow map and bind it to metadata file 520 520 * @inode: inode of the metadata file 521 521 * @shadow: shadow mapping 522 + * 523 + * Return: 0 on success, or a negative error code on failure. 522 524 */ 523 525 int nilfs_mdt_setup_shadow_map(struct inode *inode, 524 526 struct nilfs_shadow_map *shadow) ··· 542 540 /** 543 541 * nilfs_mdt_save_to_shadow_map - copy bmap and dirty pages to shadow map 544 542 * @inode: inode of the metadata file 543 + * 544 + * Return: 0 on success, or a negative error code on failure. 545 545 */ 546 546 int nilfs_mdt_save_to_shadow_map(struct inode *inode) 547 547 {
+4 -4
fs/nilfs2/page.c
··· 135 135 * nilfs_folio_buffers_clean - Check if a folio has dirty buffers or not. 136 136 * @folio: Folio to be checked. 137 137 * 138 - * nilfs_folio_buffers_clean() returns false if the folio has dirty buffers. 139 - * Otherwise, it returns true. 138 + * Return: false if the folio has dirty buffers, true otherwise. 140 139 */ 141 140 bool nilfs_folio_buffers_clean(struct folio *folio) 142 141 { ··· 499 500 * This function searches an extent of buffers marked "delayed" which 500 501 * starts from a block offset equal to or larger than @start_blk. If 501 502 * such an extent was found, this will store the start offset in 502 - * @blkoff and return its length in blocks. Otherwise, zero is 503 - * returned. 503 + * @blkoff and return its length in blocks. 504 + * 505 + * Return: Length in blocks of found extent, 0 otherwise. 504 506 */ 505 507 unsigned long nilfs_find_uncommitted_extent(struct inode *inode, 506 508 sector_t start_blk,
+30
fs/nilfs2/recovery.c
··· 88 88 * @check_bytes: number of bytes to be checked 89 89 * @start: DBN of start block 90 90 * @nblock: number of blocks to be checked 91 + * 92 + * Return: 0 on success, or %-EIO if an I/O error occurs. 91 93 */ 92 94 static int nilfs_compute_checksum(struct the_nilfs *nilfs, 93 95 struct buffer_head *bhs, u32 *sum, ··· 128 126 * @sr_block: disk block number of the super root block 129 127 * @pbh: address of a buffer_head pointer to return super root buffer 130 128 * @check: CRC check flag 129 + * 130 + * Return: 0 on success, or one of the following negative error codes on 131 + * failure: 132 + * * %-EINVAL - Super root block corrupted. 133 + * * %-EIO - I/O error. 131 134 */ 132 135 int nilfs_read_super_root_block(struct the_nilfs *nilfs, sector_t sr_block, 133 136 struct buffer_head **pbh, int check) ··· 183 176 * @nilfs: nilfs object 184 177 * @start_blocknr: start block number of the log 185 178 * @sum: pointer to return segment summary structure 179 + * 180 + * Return: Buffer head pointer, or NULL if an I/O error occurs. 186 181 */ 187 182 static struct buffer_head * 188 183 nilfs_read_log_header(struct the_nilfs *nilfs, sector_t start_blocknr, ··· 204 195 * @seg_seq: sequence number of segment 205 196 * @bh_sum: buffer head of summary block 206 197 * @sum: segment summary struct 198 + * 199 + * Return: 0 on success, or one of the following internal codes on failure: 200 + * * %NILFS_SEG_FAIL_MAGIC - Magic number mismatch. 201 + * * %NILFS_SEG_FAIL_SEQ - Sequence number mismatch. 202 + * * %NIFLS_SEG_FAIL_CONSISTENCY - Block count out of range. 203 + * * %NILFS_SEG_FAIL_IO - I/O error. 204 + * * %NILFS_SEG_FAIL_CHECKSUM_FULL - Full log checksum verification failed. 207 205 */ 208 206 static int nilfs_validate_log(struct the_nilfs *nilfs, u64 seg_seq, 209 207 struct buffer_head *bh_sum, ··· 254 238 * @pbh: the current buffer head on summary blocks [in, out] 255 239 * @offset: the current byte offset on summary blocks [in, out] 256 240 * @bytes: byte size of the item to be read 241 + * 242 + * Return: Kernel space address of current segment summary entry, or 243 + * NULL if an I/O error occurs. 257 244 */ 258 245 static void *nilfs_read_summary_info(struct the_nilfs *nilfs, 259 246 struct buffer_head **pbh, ··· 319 300 * @start_blocknr: start block number of the log 320 301 * @sum: log summary information 321 302 * @head: list head to add nilfs_recovery_block struct 303 + * 304 + * Return: 0 on success, or one of the following negative error codes on 305 + * failure: 306 + * * %-EIO - I/O error. 307 + * * %-ENOMEM - Insufficient memory available. 322 308 */ 323 309 static int nilfs_scan_dsync_log(struct the_nilfs *nilfs, sector_t start_blocknr, 324 310 struct nilfs_segment_summary *sum, ··· 595 571 * @sb: super block instance 596 572 * @root: NILFS root instance 597 573 * @ri: pointer to a nilfs_recovery_info 574 + * 575 + * Return: 0 on success, or one of the following negative error codes on 576 + * failure: 577 + * * %-EINVAL - Log format error. 578 + * * %-EIO - I/O error. 579 + * * %-ENOMEM - Insufficient memory available. 598 580 */ 599 581 static int nilfs_do_roll_forward(struct the_nilfs *nilfs, 600 582 struct super_block *sb,
+8
fs/nilfs2/segment.c
··· 250 250 * nilfs_transaction_commit() sets a timer to start the segment 251 251 * constructor. If a sync flag is set, it starts construction 252 252 * directly. 253 + * 254 + * Return: 0 on success, or a negative error code on failure. 253 255 */ 254 256 int nilfs_transaction_commit(struct super_block *sb) 255 257 { ··· 407 405 /** 408 406 * nilfs_segctor_reset_segment_buffer - reset the current segment buffer 409 407 * @sci: nilfs_sc_info 408 + * 409 + * Return: 0 on success, or a negative error code on failure. 410 410 */ 411 411 static int nilfs_segctor_reset_segment_buffer(struct nilfs_sc_info *sci) 412 412 { ··· 1319 1315 * nilfs_segctor_begin_construction - setup segment buffer to make a new log 1320 1316 * @sci: nilfs_sc_info 1321 1317 * @nilfs: nilfs object 1318 + * 1319 + * Return: 0 on success, or a negative error code on failure. 1322 1320 */ 1323 1321 static int nilfs_segctor_begin_construction(struct nilfs_sc_info *sci, 1324 1322 struct the_nilfs *nilfs) ··· 2460 2454 * nilfs_segctor_construct - form logs and write them to disk 2461 2455 * @sci: segment constructor object 2462 2456 * @mode: mode of log forming 2457 + * 2458 + * Return: 0 on success, or a negative error code on failure. 2463 2459 */ 2464 2460 static int nilfs_segctor_construct(struct nilfs_sc_info *sci, int mode) 2465 2461 {
+8
fs/nilfs2/sufile.c
··· 133 133 /** 134 134 * nilfs_sufile_get_ncleansegs - return the number of clean segments 135 135 * @sufile: inode of segment usage file 136 + * 137 + * Return: Number of clean segments. 136 138 */ 137 139 unsigned long nilfs_sufile_get_ncleansegs(struct inode *sufile) 138 140 { ··· 502 500 * nilfs_sufile_mark_dirty - mark the buffer having a segment usage dirty 503 501 * @sufile: inode of segment usage file 504 502 * @segnum: segment number 503 + * 504 + * Return: 0 on success, or a negative error code on failure. 505 505 */ 506 506 int nilfs_sufile_mark_dirty(struct inode *sufile, __u64 segnum) 507 507 { ··· 563 559 * @segnum: segment number 564 560 * @nblocks: number of live blocks in the segment 565 561 * @modtime: modification time (option) 562 + * 563 + * Return: 0 on success, or a negative error code on failure. 566 564 */ 567 565 int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum, 568 566 unsigned long nblocks, time64_t modtime) ··· 1201 1195 * @susize: size of a segment usage entry 1202 1196 * @raw_inode: on-disk sufile inode 1203 1197 * @inodep: buffer to store the inode 1198 + * 1199 + * Return: 0 on success, or a negative error code on failure. 1204 1200 */ 1205 1201 int nilfs_sufile_read(struct super_block *sb, size_t susize, 1206 1202 struct nilfs_inode *raw_inode, struct inode **inodep)
+6
fs/nilfs2/sufile.h
··· 58 58 * nilfs_sufile_scrap - make a segment garbage 59 59 * @sufile: inode of segment usage file 60 60 * @segnum: segment number to be freed 61 + * 62 + * Return: 0 on success, or a negative error code on failure. 61 63 */ 62 64 static inline int nilfs_sufile_scrap(struct inode *sufile, __u64 segnum) 63 65 { ··· 70 68 * nilfs_sufile_free - free segment 71 69 * @sufile: inode of segment usage file 72 70 * @segnum: segment number to be freed 71 + * 72 + * Return: 0 on success, or a negative error code on failure. 73 73 */ 74 74 static inline int nilfs_sufile_free(struct inode *sufile, __u64 segnum) 75 75 { ··· 84 80 * @segnumv: array of segment numbers 85 81 * @nsegs: size of @segnumv array 86 82 * @ndone: place to store the number of freed segments 83 + * 84 + * Return: 0 on success, or a negative error code on failure. 87 85 */ 88 86 static inline int nilfs_sufile_freev(struct inode *sufile, __u64 *segnumv, 89 87 size_t nsegs, size_t *ndone)
+9 -1
fs/nilfs2/super.c
··· 309 309 * This function restores state flags in the on-disk super block. 310 310 * This will set "clean" flag (i.e. NILFS_VALID_FS) unless the 311 311 * filesystem was not clean previously. 312 + * 313 + * Return: 0 on success, %-EIO if I/O error or superblock is corrupted. 312 314 */ 313 315 int nilfs_cleanup_super(struct super_block *sb) 314 316 { ··· 341 339 * nilfs_move_2nd_super - relocate secondary super block 342 340 * @sb: super block instance 343 341 * @sb2off: new offset of the secondary super block (in bytes) 342 + * 343 + * Return: 0 on success, or a negative error code on failure. 344 344 */ 345 345 static int nilfs_move_2nd_super(struct super_block *sb, loff_t sb2off) 346 346 { ··· 424 420 * nilfs_resize_fs - resize the filesystem 425 421 * @sb: super block instance 426 422 * @newsize: new size of the filesystem (in bytes) 423 + * 424 + * Return: 0 on success, or a negative error code on failure. 427 425 */ 428 426 int nilfs_resize_fs(struct super_block *sb, __u64 newsize) 429 427 { ··· 993 987 * nilfs_tree_is_busy() - try to shrink dentries of a checkpoint 994 988 * @root_dentry: root dentry of the tree to be shrunk 995 989 * 996 - * This function returns true if the tree was in-use. 990 + * Return: true if the tree was in-use, false otherwise. 997 991 */ 998 992 static bool nilfs_tree_is_busy(struct dentry *root_dentry) 999 993 { ··· 1039 1033 * 1040 1034 * This function is called exclusively by nilfs->ns_mount_mutex. 1041 1035 * So, the recovery process is protected from other simultaneous mounts. 1036 + * 1037 + * Return: 0 on success, or a negative error code on failure. 1042 1038 */ 1043 1039 static int 1044 1040 nilfs_fill_super(struct super_block *sb, struct fs_context *fc)
+14
fs/nilfs2/the_nilfs.c
··· 165 165 * containing a super root from a given super block, and initializes 166 166 * relevant information on the nilfs object preparatory for log 167 167 * scanning and recovery. 168 + * 169 + * Return: 0 on success, or %-EINVAL if current segment number is out 170 + * of range. 168 171 */ 169 172 static int nilfs_store_log_cursor(struct the_nilfs *nilfs, 170 173 struct nilfs_super_block *sbp) ··· 228 225 * load_nilfs() searches and load the latest super root, 229 226 * attaches the last segment, and does recovery if needed. 230 227 * The caller must call this exclusively for simultaneous mounts. 228 + * 229 + * Return: 0 on success, or one of the following negative error codes on 230 + * failure: 231 + * * %-EINVAL - No valid segment found. 232 + * * %-EIO - I/O error. 233 + * * %-ENOMEM - Insufficient memory available. 234 + * * %-EROFS - Read only device or RO compat mode (if recovery is required) 231 235 */ 232 236 int load_nilfs(struct the_nilfs *nilfs, struct super_block *sb) 233 237 { ··· 404 394 * nilfs_nrsvsegs - calculate the number of reserved segments 405 395 * @nilfs: nilfs object 406 396 * @nsegs: total number of segments 397 + * 398 + * Return: Number of reserved segments. 407 399 */ 408 400 unsigned long nilfs_nrsvsegs(struct the_nilfs *nilfs, unsigned long nsegs) 409 401 { ··· 417 405 /** 418 406 * nilfs_max_segment_count - calculate the maximum number of segments 419 407 * @nilfs: nilfs object 408 + * 409 + * Return: Maximum number of segments 420 410 */ 421 411 static u64 nilfs_max_segment_count(struct the_nilfs *nilfs) 422 412 {