Skip to contentSkip to conversation

xfs: Use kmem_free() instead of free()

PATCH Applied Thierry Reding 3 participants 3 messages Oct 1, 2013 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: Use kmem_free() instead of free()

This fixes a build failure caused by calling the free() function which does not exist in the Linux kernel.

---
 fs/xfs/xfs_log_recover.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_log_recover.c +1 -1
index 4324058..3979749 100644
@@ -1585,7 +1585,7 @@ xlog_recover_add_to_trans(
 		"bad number of regions (%d) in inode log format",
 				  in_f->ilf_size);
 			ASSERT(0);
-			free(ptr);
+			kmem_free(ptr);
 			return XFS_ERROR(EIO);
 		}
 
Signature · 6 lines
1.8.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Thierry Reding

This fixes a build failure caused by calling the free() function which does not exist in the Linux kernel.

---
  fs/xfs/xfs_log_recover.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_log_recover.c +0 -0
index 4324058..3979749 100644

fs/xfs/xfs_log_recover.c xlog_recover_add_to_trans( · line 1591

Quoted 8 lines
fs/xfs/xfs_log_recover.c +1 -1
@@ -1585,7 +1585,7 @@ xlog_recover_add_to_trans(
  		"bad number of regions (%d) in inode log format",
  				  in_f->ilf_size);
  			ASSERT(0);
-			free(ptr);
+			kmem_free(ptr);
  			return XFS_ERROR(EIO);
  		}
 

Looks good. I will remove the other list items in another patch.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Applied
#2 lore raw
Quoted 25 lines · Mark Tinguely
Quoted 13 lines · Thierry Reding

This fixes a build failure caused by calling the free() function which does not exist in the Linux kernel.

---
 fs/xfs/xfs_log_recover.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_log_recover.c +0 -0
index 4324058..3979749 100644

fs/xfs/xfs_log_recover.c xlog_recover_add_to_trans( · line 1591

Quoted 8 lines
fs/xfs/xfs_log_recover.c +1 -1
@@ -1585,7 +1585,7 @@ xlog_recover_add_to_trans(
 		"bad number of regions (%d) in inode log format",
 				  in_f->ilf_size);
 			ASSERT(0);
-			free(ptr);
+			kmem_free(ptr);
 			return XFS_ERROR(EIO);
 		}
 

Looks good. I will remove the other list items in another patch.

Quoted 1 line

Gah. Build Fail. Apparently things were getting a little punchy over here.

Applied, and thanks Thierry.

-Ben

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs