Skip to content

Commit 343d4a3

Browse files
konisakpm00
authored andcommitted
nilfs2: correct return value kernel-doc descriptions for the rest
Similar to the previous changes to fix return value descriptions, this fixes the format of the return value descriptions of functions for the rest. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ryusuke Konishi <[email protected]> Cc: "Brian G ." <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent b826850 commit 343d4a3

File tree

6 files changed

+50
-90
lines changed

6 files changed

+50
-90
lines changed

fs/nilfs2/gcinode.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,11 @@
4646
* specified by @pbn to the GC pagecache with the key @blkoff.
4747
* This function sets @vbn (@pbn if @vbn is zero) in b_blocknr of the buffer.
4848
*
49-
* Return Value: On success, 0 is returned. On Error, one of the following
50-
* negative error code is returned.
51-
*
52-
* %-EIO - I/O error.
53-
*
54-
* %-ENOMEM - Insufficient amount of memory available.
55-
*
56-
* %-ENOENT - The block specified with @pbn does not exist.
49+
* Return: 0 on success, or one of the following negative error codes on
50+
* failure:
51+
* * %-EIO - I/O error (including metadata corruption).
52+
* * %-ENOENT - The block specified with @pbn does not exist.
53+
* * %-ENOMEM - Insufficient memory available.
5754
*/
5855
int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff,
5956
sector_t pbn, __u64 vbn,
@@ -114,12 +111,11 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff,
114111
* specified by @vbn to the GC pagecache. @pbn can be supplied by the
115112
* caller to avoid translation of the disk block address.
116113
*
117-
* Return Value: On success, 0 is returned. On Error, one of the following
118-
* negative error code is returned.
119-
*
120-
* %-EIO - I/O error.
121-
*
122-
* %-ENOMEM - Insufficient amount of memory available.
114+
* Return: 0 on success, or one of the following negative error codes on
115+
* failure:
116+
* * %-EIO - I/O error (including metadata corruption).
117+
* * %-ENOENT - Invalid virtual block address.
118+
* * %-ENOMEM - Insufficient memory available.
123119
*/
124120
int nilfs_gccache_submit_read_node(struct inode *inode, sector_t pbn,
125121
__u64 vbn, struct buffer_head **out_bh)

fs/nilfs2/inode.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,7 @@ struct inode *nilfs_iget_for_gc(struct super_block *sb, unsigned long ino,
598598
* or does nothing if the inode already has it. This function allocates
599599
* an additional inode to maintain page cache of B-tree nodes one-on-one.
600600
*
601-
* Return Value: On success, 0 is returned. On errors, one of the following
602-
* negative error code is returned.
603-
*
604-
* %-ENOMEM - Insufficient memory available.
601+
* Return: 0 on success, or %-ENOMEM if memory is insufficient.
605602
*/
606603
int nilfs_attach_btree_node_cache(struct inode *inode)
607604
{
@@ -660,11 +657,8 @@ void nilfs_detach_btree_node_cache(struct inode *inode)
660657
* in one inode and the one for b-tree node pages is set up in the
661658
* other inode, which is attached to the former inode.
662659
*
663-
* Return Value: On success, a pointer to the inode for data pages is
664-
* returned. On errors, one of the following negative error code is returned
665-
* in a pointer type.
666-
*
667-
* %-ENOMEM - Insufficient memory available.
660+
* Return: a pointer to the inode for data pages on success, or %-ENOMEM
661+
* if memory is insufficient.
668662
*/
669663
struct inode *nilfs_iget_for_shadow(struct inode *inode)
670664
{

fs/nilfs2/recovery.c

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -754,18 +754,13 @@ static void nilfs_abort_roll_forward(struct the_nilfs *nilfs)
754754
* @sb: super block instance
755755
* @ri: pointer to a nilfs_recovery_info struct to store search results.
756756
*
757-
* Return Value: On success, 0 is returned. On error, one of the following
758-
* negative error code is returned.
759-
*
760-
* %-EINVAL - Inconsistent filesystem state.
761-
*
762-
* %-EIO - I/O error
763-
*
764-
* %-ENOSPC - No space left on device (only in a panic state).
765-
*
766-
* %-ERESTARTSYS - Interrupted.
767-
*
768-
* %-ENOMEM - Insufficient memory available.
757+
* Return: 0 on success, or one of the following negative error codes on
758+
* failure:
759+
* * %-EINVAL - Inconsistent filesystem state.
760+
* * %-EIO - I/O error.
761+
* * %-ENOMEM - Insufficient memory available.
762+
* * %-ENOSPC - No space left on device (only in a panic state).
763+
* * %-ERESTARTSYS - Interrupted.
769764
*/
770765
int nilfs_salvage_orphan_logs(struct the_nilfs *nilfs,
771766
struct super_block *sb,
@@ -830,14 +825,11 @@ int nilfs_salvage_orphan_logs(struct the_nilfs *nilfs,
830825
* segment pointed by the superblock. It sets up struct the_nilfs through
831826
* this search. It fills nilfs_recovery_info (ri) required for recovery.
832827
*
833-
* Return Value: On success, 0 is returned. On error, one of the following
834-
* negative error code is returned.
835-
*
836-
* %-EINVAL - No valid segment found
837-
*
838-
* %-EIO - I/O error
839-
*
840-
* %-ENOMEM - Insufficient memory available.
828+
* Return: 0 on success, or one of the following negative error codes on
829+
* failure:
830+
* * %-EINVAL - No valid segment found.
831+
* * %-EIO - I/O error.
832+
* * %-ENOMEM - Insufficient memory available.
841833
*/
842834
int nilfs_search_super_root(struct the_nilfs *nilfs,
843835
struct nilfs_recovery_info *ri)

fs/nilfs2/segbuf.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,7 @@ static int nilfs_segbuf_submit_bh(struct nilfs_segment_buffer *segbuf,
406406
* @segbuf: buffer storing a log to be written
407407
* @nilfs: nilfs object
408408
*
409-
* Return Value: On Success, 0 is returned. On Error, one of the following
410-
* negative error code is returned.
411-
*
412-
* %-EIO - I/O error
413-
*
414-
* %-ENOMEM - Insufficient memory available.
409+
* Return: Always 0.
415410
*/
416411
static int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf,
417412
struct the_nilfs *nilfs)
@@ -452,10 +447,7 @@ static int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf,
452447
* nilfs_segbuf_wait - wait for completion of requested BIOs
453448
* @segbuf: segment buffer
454449
*
455-
* Return Value: On Success, 0 is returned. On Error, one of the following
456-
* negative error code is returned.
457-
*
458-
* %-EIO - I/O error
450+
* Return: 0 on success, or %-EIO if I/O error is detected.
459451
*/
460452
static int nilfs_segbuf_wait(struct nilfs_segment_buffer *segbuf)
461453
{

fs/nilfs2/segment.c

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,10 @@ static int nilfs_prepare_segment_lock(struct super_block *sb,
191191
* When @vacancy_check flag is set, this function will check the amount of
192192
* free space, and will wait for the GC to reclaim disk space if low capacity.
193193
*
194-
* Return Value: On success, 0 is returned. On error, one of the following
195-
* negative error code is returned.
196-
*
197-
* %-ENOMEM - Insufficient memory available.
198-
*
199-
* %-ENOSPC - No space left on device
194+
* Return: 0 on success, or one of the following negative error codes on
195+
* failure:
196+
* * %-ENOMEM - Insufficient memory available.
197+
* * %-ENOSPC - No space left on device (if checking free space).
200198
*/
201199
int nilfs_transaction_begin(struct super_block *sb,
202200
struct nilfs_transaction_info *ti,
@@ -2314,18 +2312,13 @@ static void nilfs_segctor_wakeup(struct nilfs_sc_info *sci, int err, bool force)
23142312
* nilfs_construct_segment - construct a logical segment
23152313
* @sb: super block
23162314
*
2317-
* Return Value: On success, 0 is returned. On errors, one of the following
2318-
* negative error code is returned.
2319-
*
2320-
* %-EROFS - Read only filesystem.
2321-
*
2322-
* %-EIO - I/O error
2323-
*
2324-
* %-ENOSPC - No space left on device (only in a panic state).
2325-
*
2326-
* %-ERESTARTSYS - Interrupted.
2327-
*
2328-
* %-ENOMEM - Insufficient memory available.
2315+
* Return: 0 on success, or one of the following negative error codes on
2316+
* failure:
2317+
* * %-EIO - I/O error (including metadata corruption).
2318+
* * %-ENOMEM - Insufficient memory available.
2319+
* * %-ENOSPC - No space left on device (only in a panic state).
2320+
* * %-ERESTARTSYS - Interrupted.
2321+
* * %-EROFS - Read only filesystem.
23292322
*/
23302323
int nilfs_construct_segment(struct super_block *sb)
23312324
{
@@ -2349,18 +2342,13 @@ int nilfs_construct_segment(struct super_block *sb)
23492342
* @start: start byte offset
23502343
* @end: end byte offset (inclusive)
23512344
*
2352-
* Return Value: On success, 0 is returned. On errors, one of the following
2353-
* negative error code is returned.
2354-
*
2355-
* %-EROFS - Read only filesystem.
2356-
*
2357-
* %-EIO - I/O error
2358-
*
2359-
* %-ENOSPC - No space left on device (only in a panic state).
2360-
*
2361-
* %-ERESTARTSYS - Interrupted.
2362-
*
2363-
* %-ENOMEM - Insufficient memory available.
2345+
* Return: 0 on success, or one of the following negative error codes on
2346+
* failure:
2347+
* * %-EIO - I/O error (including metadata corruption).
2348+
* * %-ENOMEM - Insufficient memory available.
2349+
* * %-ENOSPC - No space left on device (only in a panic state).
2350+
* * %-ERESTARTSYS - Interrupted.
2351+
* * %-EROFS - Read only filesystem.
23642352
*/
23652353
int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode,
23662354
loff_t start, loff_t end)

fs/nilfs2/the_nilfs.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ void nilfs_set_last_segment(struct the_nilfs *nilfs,
4949
* alloc_nilfs - allocate a nilfs object
5050
* @sb: super block instance
5151
*
52-
* Return Value: On success, pointer to the_nilfs is returned.
53-
* On error, NULL is returned.
52+
* Return: a pointer to the allocated nilfs object on success, or NULL on
53+
* failure.
5454
*/
5555
struct the_nilfs *alloc_nilfs(struct super_block *sb)
5656
{
@@ -200,8 +200,7 @@ static int nilfs_store_log_cursor(struct the_nilfs *nilfs,
200200
* exponent information written in @sbp and stores it in @blocksize,
201201
* or aborts with an error message if it's too large.
202202
*
203-
* Return Value: On success, 0 is returned. If the block size is too
204-
* large, -EINVAL is returned.
203+
* Return: 0 on success, or %-EINVAL if the block size is too large.
205204
*/
206205
static int nilfs_get_blocksize(struct super_block *sb,
207206
struct nilfs_super_block *sbp, int *blocksize)
@@ -538,7 +537,7 @@ static int nilfs_valid_sb(struct nilfs_super_block *sbp)
538537
* area, or if the parameters themselves are not normal, it is
539538
* determined to be invalid.
540539
*
541-
* Return Value: true if invalid, false if valid.
540+
* Return: true if invalid, false if valid.
542541
*/
543542
static bool nilfs_sb2_bad_offset(struct nilfs_super_block *sbp, u64 offset)
544543
{
@@ -684,8 +683,7 @@ static int nilfs_load_super_block(struct the_nilfs *nilfs,
684683
* reading the super block, getting disk layout information, initializing
685684
* shared fields in the_nilfs).
686685
*
687-
* Return Value: On success, 0 is returned. On error, a negative error
688-
* code is returned.
686+
* Return: 0 on success, or a negative error code on failure.
689687
*/
690688
int init_nilfs(struct the_nilfs *nilfs, struct super_block *sb)
691689
{

0 commit comments

Comments
 (0)