On 2018年07月08日 23:42, Christoph Hellwig wrote:
/*
+ * Convert an inode from extents to the local format.
+ * Free all the extents of the inode and reset it to the local
+ * format. Copy the contents of the inode's blocks to the inode's
+ * literal area.
+ */
Please use up all 80 chars for your comments (and code)
+int
+xfs_bmap_extents_to_local(
+ xfs_trans_t *tp,
+ xfs_inode_t *ip,
Please use the struct types instead of the typedefs wherever possible.
+ if (xfs_iext_count(ifp) == 0)
+ goto init_local_fork;
+
+ for_each_xfs_iext(ifp, &icur, &got) {
for_each_xfs_iext should do the right thing for an empty fork.
+out:
+ return error;
Just return errors directly instead of going to a label that returns
the error.
+}
+
+
+/*
One blank line after a function body is enough.
OK, I will fix all of the above, thanks for the review.
Thanks
Shan Hai
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html