aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/grufault.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-12-15 19:48:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:14 -0500
commit091f1a10614db89a108cda980425799730d73d8a (patch)
tree1564f5eec330225cc652c9c89209d84898a7c653 /drivers/misc/sgi-gru/grufault.c
parent827f02febfcdfb03bc056bf479a13b5bcb35dfd7 (diff)
gru: add comments raised in previous code reviews
Add comments from previous code reviews. The comments help explain some of the more esoteric aspects of the driver. Move a free() to the other side of an unlock. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grufault.c')
-rw-r--r--drivers/misc/sgi-gru/grufault.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index 679e01778286..2605edfbaebe 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -733,6 +733,11 @@ long gru_get_gseg_statistics(unsigned long arg)
733 if (copy_from_user(&req, (void __user *)arg, sizeof(req))) 733 if (copy_from_user(&req, (void __user *)arg, sizeof(req)))
734 return -EFAULT; 734 return -EFAULT;
735 735
736 /*
737 * The library creates arrays of contexts for threaded programs.
738 * If no gts exists in the array, the context has never been used & all
739 * statistics are implicitly 0.
740 */
736 gts = gru_find_lock_gts(req.gseg); 741 gts = gru_find_lock_gts(req.gseg);
737 if (gts) { 742 if (gts) {
738 memcpy(&req.stats, &gts->ustats, sizeof(gts->ustats)); 743 memcpy(&req.stats, &gts->ustats, sizeof(gts->ustats));