@@ -49,28 +49,31 @@ static int jffs2_rp_can_write(struct jffs2_sb_info *c)
4949 return 0 ;
5050}
5151
52+ static int jffs2_do_reserve_space (struct jffs2_sb_info * c , uint32_t minsize ,
53+ uint32_t * len , uint32_t sumsize );
54+
5255/**
5356 * jffs2_reserve_space - request physical space to write nodes to flash
5457 * @c: superblock info
5558 * @minsize: Minimum acceptable size of allocation
5659 * @len: Returned value of allocation length
5760 * @prio: Allocation type - ALLOC_{NORMAL,DELETION}
61+ * @sumsize: summary size requested or JFFS2_SUMMARY_NOSUM_SIZE for no summary
62+ *
63+ * Requests a block of physical space on the flash.
5864 *
59- * Requests a block of physical space on the flash. Returns zero for success
60- * and puts 'len' into the appropriate place, or returns -ENOSPC or other
61- * error if appropriate. Doesn't return len since that's
65+ * Returns: %0 for success and puts 'len' into the appropriate place,
66+ * or returns -ENOSPC or other error if appropriate.
67+ * Doesn't return len since that's already returned in @len.
6268 *
63- * If it returns zero , jffs2_reserve_space() also downs the per-filesystem
69+ * If it returns %0 , jffs2_reserve_space() also downs the per-filesystem
6470 * allocation semaphore, to prevent more than one allocation from being
65- * active at any time. The semaphore is later released by jffs2_commit_allocation()
71+ * active at any time. The semaphore is later released by jffs2_commit_allocation().
6672 *
6773 * jffs2_reserve_space() may trigger garbage collection in order to make room
6874 * for the requested allocation.
6975 */
7076
71- static int jffs2_do_reserve_space (struct jffs2_sb_info * c , uint32_t minsize ,
72- uint32_t * len , uint32_t sumsize );
73-
7477int jffs2_reserve_space (struct jffs2_sb_info * c , uint32_t minsize ,
7578 uint32_t * len , int prio , uint32_t sumsize )
7679{
@@ -488,13 +491,16 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
488491/**
489492 * jffs2_add_physical_node_ref - add a physical node reference to the list
490493 * @c: superblock info
491- * @new: new node reference to add
494+ * @ofs: offset in the block
492495 * @len: length of this physical node
496+ * @ic: inode cache pointer
493497 *
494498 * Should only be used to report nodes for which space has been allocated
495499 * by jffs2_reserve_space.
496500 *
497501 * Must be called with the alloc_sem held.
502+ *
503+ * Returns: pointer to new node on success or -errno code on error
498504 */
499505
500506struct jffs2_raw_node_ref * jffs2_add_physical_node_ref (struct jffs2_sb_info * c ,
0 commit comments