Skip to contentSkip to conversation

: grub: Close parent device in grub_fs_uuid_close().

PATCH In review David Miller 1 participant 2 messages Apr 23, 2009 – Apr 24, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : grub: Close parent device in grub_fs_uuid_close().

This is the second part of fixing FS_UUID on sparc64.

Strangely, the FS_UUID close handler was empty. This leaks the parent disk and device object.

Fix by calling grub_disk_close() on the appropriate object.

2009-04-23 David S. Miller <[email protected]>

	* disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
	on disk->data.
---
 disk/fs_uuid.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
disk/fs_uuid.c +2 -0
index 125d29b..9d83bb8 100644
@@ -97,6 +97,8 @@ grub_fs_uuid_open (const char *name, grub_disk_t disk)
 static void
 grub_fs_uuid_close (grub_disk_t disk __attribute((unused)))
 {
+  grub_disk_t parent = disk->data;
+  grub_disk_close (parent);
 }
 
 static grub_err_t
Signature · 1 line
1.6.2.4
#1 lore raw

From: David Miller <[email protected]>
Date: Thu, 23 Apr 2009 03:33:16 -0700 (PDT)

Quoted 4 lines

2009-04-23 David S. Miller <[email protected]>

	* disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
	on disk->data.

Committed.