Print this page
3742 zfs comments need cleaner, more consistent style
Submitted by:   Will Andrews <willa@spectralogic.com>
Submitted by:   Alan Somers <alans@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>
Reviewed by:    George Wilson <george.wilson@delphix.com>
Reviewed by:    Eric Schrock <eric.schrock@delphix.com>

@@ -1004,13 +1004,12 @@
         }
         ZFS_OBJ_HOLD_EXIT(zfsvfs, obj);
 }
 
 /*
- * zfs_xvattr_set only updates the in-core attributes
- * it is assumed the caller will be doing an sa_bulk_update
- * to push the changes out
+ * Update in-core attributes.  It is assumed the caller will be doing an
+ * sa_bulk_update to push the changes out.
  */
 void
 zfs_xvattr_set(znode_t *zp, xvattr_t *xvap, dmu_tx_t *tx)
 {
         xoptattr_t *xoap;

@@ -1445,12 +1444,11 @@
  * Increase the file length
  *
  *      IN:     zp      - znode of file to free data in.
  *              end     - new end-of-file
  *
- *      RETURN: 0 if success
- *              error code if failure
+ *      RETURN: 0 on success, error code on failure
  */
 static int
 zfs_extend(znode_t *zp, uint64_t end)
 {
         zfsvfs_t *zfsvfs = zp->z_zfsvfs;

@@ -1523,12 +1521,11 @@
  *
  *      IN:     zp      - znode of file to free data in.
  *              off     - start of section to free.
  *              len     - length of section to free.
  *
- *      RETURN: 0 if success
- *              error code if failure
+ *      RETURN: 0 on success, error code on failure
  */
 static int
 zfs_free_range(znode_t *zp, uint64_t off, uint64_t len)
 {
         zfsvfs_t *zfsvfs = zp->z_zfsvfs;

@@ -1562,12 +1559,11 @@
  * Truncate a file
  *
  *      IN:     zp      - znode of file to free data in.
  *              end     - new end-of-file.
  *
- *      RETURN: 0 if success
- *              error code if failure
+ *      RETURN: 0 on success, error code on failure
  */
 static int
 zfs_trunc(znode_t *zp, uint64_t end)
 {
         zfsvfs_t *zfsvfs = zp->z_zfsvfs;

@@ -1661,12 +1657,11 @@
  *              off     - start of range
  *              len     - end of range (0 => EOF)
  *              flag    - current file open mode flags.
  *              log     - TRUE if this action should be logged
  *
- *      RETURN: 0 if success
- *              error code if failure
+ *      RETURN: 0 on success, error code on failure
  */
 int
 zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
 {
         vnode_t *vp = ZTOV(zp);